There are a lot of Qt styles that have been created by enthusiasts – QtCurve, Oxygen, Bespin and as latest addition to the library – QGtkStyle (excellent job, Jens!), which makes a bunch of Gtk themes available to Qt. But wait a second – all these styles are mainly used by Linux people! What about people suffering with Windows? Here is the answer – if you feel geek enough to compile Qt and the style yourself and if you want your application to look different (read: “beautiful”) – you can try the new QGtkStyle_win32 available on labs (it is a separate project for now):
svn://labs.trolltech.com/svn/styles/gtkstyle_win32
I’ve tested it with two Gtk theme engines – wimp (which is distributed with Gimp and emulates the WindowsXP style – yes, it is crazy to use the Gtk theme engine on WindowsXP through qgtkstyle to emulate WindowsXP theme
. The second theme engine I’ve tried is murrine, which was quite easy to compile on Windows. It’s time for some screenshots:

WindowsXP style (the one that is deployed with Gimp)
You can even run the Perforce Visual Client with it! (however it crashes sometimes – looks like the perforce guys made some binary incompatible changes to the Qt libraries they ship with their app).
To try it out you will need a Gtk development package
You can either use Qt compiled with Visual C++ or MinGW, however in the latter case you need to recompile Qt with the “-mms-bitfields” compiler option to make it binary compatible with the Gtk libraries.
Afterwards just put your gtkstyle(d).dll in the plugin path (either %QTDIR%\plugins\styles or <application directory>\plugins\styles) and launch your application with the “-style gtk” command-line option. (and make sure you have both mingwm10.dll and gtk libraries in your system path!).
At this point you should be able to run Qt apps with the default Gtk theme, so the next step is to compile the murrine Gtk2 theme engine. For this step you need the patch to be able to compile murrine on Windows. Then just put the libmurrine.dll to the Gtk engines directory <gtk root>\lib\gtk-2.0\2.10.0\engines) and you are ready to use Murrine Themes!
P.S. of course native Gtk file dialogs are also available on Windows
No related posts.
7 comments
I haven’t tried it on Windows XP but it doesn’t seem to work too well on Vista using wimp. Things like comboboxes and tab pages are missing their borders and the slider’s thumb is vertical not horizontal. Button boxes display images on buttons even though gtk-button-images is turned off. It’s fun to have a play with but I guess it’s still in it’s early stages?
You are crazy Denis
grant: Since the wimp theme has never been used outside GTK (think Firefox, Java, Qt), that particular theme as a lot of problems you will not see in other GTK themes. We will continue to address them all but the question is anyone you would want to use the Gtk+ Windows look as opposed to the one that comes with Qt?
Man, this so doesn’t make sense. Gtk suffers from non-native appearance on windows, and its file dialog blows, and you make that suckage available to Qt? I guess I just miss something.
To everyone who says this doesn’t make sense… yes, it’s silly, but it’s a matter of code portability. There’s no compelling reason it shouldn’t be able to build on Windows if all of the dependencies are available. And making GTK’s flaws available through Qt seems absurd, but when you’re striving for a unified desktop on GNOME, you just have to deal with it in exchange for making an app that doesn’t throw the user out of his habits.
Note that I said “on windows”. Unified look-and-feel on X is a great goal; but that’s only for X. Applications should look windows on windows, and mac on mac, not gtk everywhere like gtk applications do (unlike Qt applications which do look native today!)
I like this theme. I use platinum and qgtkstyle themes.
Comments on this entry are closed.