[PyQt] Applying styles to a QApplication
Giovanni Bajo
rasky at develer.com
Wed Nov 5 22:31:41 GMT 2008
On mer, 2008-11-05 at 15:45 +0000, Phil Thompson wrote:
> On Wed, 5 Nov 2008 16:38:01 +0100, "NARCISO, Rui" <RUI.NARCISO at airbus.com>
> wrote:
> > Hi
> >
> > I'm trying to apply the QMotifStyle to my applciation but I can't import
> > it or use it. It tells me that the name doesn't exist.
> >
> > I've checked the QtGui folder and both the QMotifStyle and qmotifstyle.h
> > files are present ...
> >
> > I'm using Qt4.
>
> PyQt doesn't wrap the style classes. Just pass "-style=motif" as a command
> line argument.
Or if you need an instance for some reason, use:
>>> QStyleFactory.create("motif")
<PyQt4.QtGui.QStyle object at 0x1679b78>
You'll see and manipulate it as a QStyle instance from Python, but it's
a QMotifStyle instance at the C++ level.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
More information about the PyQt
mailing list