I found out that Qt4 apps can be made to automatically match the current GTK+2 theme. This is great news, it makes theming for mixed Qt4 and GTK+2 apps so simple.
There are three tricks to it. Firstly, /root/.config/Trolltech.conf is required, with just this in it:
Secondly, /etc/rc.d/profile.d/pup_gtk has just this line:
And thirdly, some means is required to append this line to /root/.gtkrc-2.0:
gtk-theme-name="<name of gtk theme>"
Which I have done by modifying the template for the GTK+2 theme-setter 'gtk-chtheme' in Woof, to append that line after running 'gtk-chtheme' executable.
It works great, Qt4 apps like just like the GTK+2 apps.
The downside is that Qt5 uses a different theming system, as does GTK+3. There is currently no method to get GTK+3 apps to match those of GTK+2 apps, which is most unfortunate.
Note, the gtk-chtheme template is only applied to a package from a host-distro, not to a PET. So, any existing gtk-chtheme PET will have to be manually modified.
My current Upups use gtk-chtheme DEB package, so OK, but Slacko and my spup14 use the PET from 'common' repo, so I will fix that.
Comments:Posted on 29 Mar 2013, 12:55 by BarryK
Qt4 theme match GTK+2
One more thing, a change was required in 3builddistro.
Also, I have fixed the 'gtk-chtheme' PET package, as described above (11K):
Posted on 30 Mar 2013, 13:36 by disciple
QT5 and GTK2 themes
I haven't got QT5 yet, but from what I've read it still has GTK2 theme support. Perhaps your QT was compiled on a system without GTK2?
Posted on 30 Mar 2013, 15:10 by BarryK
Qt5 supports GTK+2 themes
Ah, yes, you are right. Reading this page:
It seems that Qt5 will still support the "GTK+" style, based on GTK+2 themes. They are not supporting GTK+3 themes yet.
Interesting, Qt seems to be pulling ahead of GTK: