Tag Archives: Qgtkstyle

Install Qgtkstyle

Since I haven’t found any proper debs of qgtkstyle around, I’m just going to tell how to compile it from source.

If you don’t know what Qgtkstyle is, Qgtkstyle is a Qt theme engine that uses your GTK theme directly.

First thing to do is to enable the Backports repository since you need Qt 4.4 which is in the Backports in Hardy.  You can do this by going System→Administration→Software Sources, then going to the Updates tab and enabling the “Unsupported updates (hardy-backports)” repository.

Software Sources
Software Sources

Click Close and then click the Reload button when prompted.  Now to install all the development packages needed to compile Qgtkstyle.

sudo apt-get install build-essential libqt4-dev libgtk2.0-dev subversion qt4-qtconfig

This is optional if you want to install with Checkinstall

sudo apt-get install checkinstall

Now to get the code

svn co svn://labs.trolltech.com/svn/styles/gtkstyle

There should be a folder in your home directory called gtkstyle. Now enter that directory

cd gtkstyle/

Now compile it

qmake qgtkstyle.pro

Now here you have a choice. You can either just install it directly with

sudo make install

Or you may like to build a deb out of it for easy removal later if need be.  In that case do

sudo checkinstall

and follow the instructions.  They’re pretty self explanitory.

Now if you go under System→Preferences→Qt 4 Settings you can choose GTK from the drop down menu.

Qt 4 Settings
Qt 4 Settings

Then do a File→Save and enjoy Qt applications with a nice GTK integration. 🙂

Also if you want to see a little Easter Egg move that preview window around. Yes you can actually move that. I won’t spoile the surprise. It gave me a little laugh when I first found it. 😉

Why the hate for Qt?

I’ve noticed there seems to be a lot of “ZOMG it’s Qt! Oh Noes!” going on and I just don’t get it.  I think the reason is some confusion and lack of understanding.  Now I’m not talking about the programming languages behind Qt and GTK, I’m talking about the typical end user’s experience.  People seem to assume that Qt == KDE, Qt requires a lot of KDE libs, and/or Qt looks ugly and doesn’t integrate well in a GTK environment.

First, a Qt application doesn’t always mean it’s KDE.  Yes KDE is based on Qt, but there’s a huge difference between a pure Qt app and a KDE app.  An application that is written in pure Qt has nothing to do with KDE whatsoever.    Some of these include SMplayer, KeePassX, VLC (0.9.2), VirtualBox, and many others.  KDE apps will depend on a lot of KDE specific stuff that will have a lot of dependencies.  This goes on to the second point.  A pure Qt app does not require a tone of KDE libs since it has nothing to do with KDE.  All it usually needs libqt.

Finally to put this integration mess to rest.  Qt integrating into a GTK environment used to be an issue.  This is no longer true.  This argument is deprecated.  Qgtkstyle (which will come bundled with Qt 4.5 😀 ) is a Qt theme engine that uses your GTK theme directly.  It does not try to emulate a GTK theme or anything like that.  It actually uses the GTK theme.  So now it can’t be argued that Qt doesn’t integrate with GTK anymore.  You pretty much can’t tell the difference.

VirtualBox
VirtualBox
SMplayer
SMplayer
SMplayer Preferences
SMplayer Preferences

You almost can’t even tell those are Qt applications.

So I just don’t understand all the Qt hating going on.

</rant>