Uniform look for Qt and GTK applications, part 2

Published: Sat, 20 Aug 2016

In: Linux

Tags: qt gtk

Translations: bs

Until now I've been using the GTK2 widget style for Qt as mentioned in this blog post. It worked fine, but it had the disadvantage of not utilizing my system icon and font settings, nor using the better GTK2 file dialog (it used the awful default Qt file dialog). There was a way to get those things to work, but with mixed results, which often resulted in segfaults (described in this thread). Basically, you can't use the GTK3 platform theme for Qt along with the GTK2 widget theme for Qt.

Fortunately someone was kind enough to bundle (and create) a GTK2 platform AND widget theme for Qt5. You can find it here. I tested it and it works well. All of the Qt5 applications can now use my system icon theme and what's even more important: the better GTK2 file-dialog.

qt5gtk-2.png

Arch users can use this PKGBUILD to install it. Make sure to remove the QT_STYLE_OVERRIDE=gtk2 environment variable if you had it set and export QT_QPA_PLATFORMTHEME=qt5gtk2 instead.

Link to the project's git repository and website: https://bitbucket.org/trialuser02/qt5gtk2