[PyKDE] Support for QWindowsXPStyle
Ulrich Berning
ulrich.berning at t-online.de
Mon May 19 01:24:00 BST 2003
Phil Thompson wrote:
>On Friday 16 May 2003 8:55 am, Ulrich Berning wrote:
>
>
>>Hi all,
>>
>>the attached sip file together with the attached patch make the
>>QWindowsXPStyle class available for PyQt.
>>
>>
>
>As this class isn't documented I don't think it's part of the official API.
>I've asked Trolltech and I'll add it if they say it is fully supported.
>
>Phil
>
>_______________________________________________
>PyKDE mailing list PyKDE at mats.gmd.de
>http://mats.gmd.de/mailman/listinfo/pykde
>
>
>
From the ChangeLog of Qt-3.0.1:
-----
- MS-Windows XP
This is the first release to fully support Windows XP,
including the new themable GUI styles.
The Windows XP style can only be built as a plugin, which requires
Qt to be configured as a shared library. To build the plugin
you must install a Microsoft Platform SDK for October 2001
or later. Your INCLUDE and LIB environment variables must
point to the respective directories in the SDK installation.
-----
I have configured Qt 3.1.2 on Windows with built in support for the
WindowsXP style to give the users on that platform the native WindowsXP
look and feel (my build platform is Windows2000, but it has the required
SDK installed).
Our application allows the user to configure the style of the
application at runtime. The user selects the style from a combo box
filled with the result of QStyleFactory.keys(). So on WindowsXP, the
user can also select WindowsXP style. On application exit, this
configuration is saved.
At next startup, the saved configuration is read, QStyleFactory.create()
is used to create the style and then it is set for the whole application
with qApp.setStyle(). This is the point where the application crashes
when the QWindowsXPStyle class is not available in PyQt.
If the QWindowsXPStyle class is not supported by PyQt, I have to decide
either to disable this style completely, or to always apply the patch to
PyQt when a new build of PyQt has to be done.
Disabling the style means the WindowsXP users never can get their native
look and feel.
When the ChangeLog of Qt states support for the Windows XP style, when
QSytleFactory::keys() returns "WindowsXP", when
QStyleFactory::create("WindowsXP") returns an instance of
QWindowsXPStyle, doesn't this mean that the class QWindowsXPStyle is
fully supported although it is not documented (yet)?
Ulli
More information about the PyQt
mailing list