Qt GTK+ style

Hi,

When installing VirtualBox I noticed it used a default (quite ugly) Qt style. Having done this in Linux a few times, I launched qtconfig-qt4 and tried to switch to the GTK+ style only to notice that it's not there ;) I found a header file qgtkstyle.h in /usr/local/include/qt4/QtGui but I don't know if that means anything.
Is this my fault or is it e.g. possible that the package version of Qt is built without GTK support?

Thanks!
 
Several weeks ago I installed something from ports and if I recall right, there was some option to build support for GTK style in Qt library. I don't have that machine at hand, so I can't look exactly, but you can try
# cd /usr/ports/emulators/virtualbox-ose/ && make config-recursive which should show you all possible options of port and its dependencies.
 
x11-themes/gtk-qt4-engine. cd to this port and cat port-descr to see if it fits your needs. You may just need to install some KDE themes (if you have /usr/ports/ports-mgmt/psearch installed psearch plastique, else use find).

The other option is to rebuild Qt with the following in your make.conf
Code:
 QT4 += WITH_GTK_STYLE

I'm not sure this is the right flag. I will double check and edit my post when I'm not on my cell phone. This knob cannot be set using
Code:
 make config
and to my understanding uses the GTK engine to render basic Qt, or perhaps it's an emulation of some kind. Can someone enlighten me? I'm certain QtOpenGL wasn't put into a GTK wrapper (hence I'm guessing it's just certain classes).
 
@ikbendeman, keep in mind you are responding to a two year old post. Don't expect a reply any time soon ;)
 
Last edited by a moderator:
I stand corrected:

Code:
=====================================================================

Qt 4 can be built with optional support for:
 - Common UNIX Printing System (CUPS)
 - Network Audio System (NAS)
 - Qt style that renders using GTK (QGTKSTYLE)

In order to enable them, you have to add
        QT4_OPTIONS=    CUPS NAS QGTKSTYLE
to your /etc/make.conf and compile devel/qt4-corelib and
x11-toolkits/qt4-gui ports.

Attention! Whenever you change the QT4_OPTIONS both
devel/qt4-corelib and x11-toolkits/qt4-gui ports must be rebuilt!

=====================================================================

@SirDice, that's what you get when you browse on a 3" screen :)
 
Last edited by a moderator:
Back
Top