Ubuntu: GTK themes not working on Qt5 apps


I'm running Xubuntu 16.04.1 right now (w/ XFCE4). I do a lot of Qt5 application development. Right now the applications that I'm making aren't matching the GTK theme that I have set (which is "Greybird."), it's giving me the "Raleigh," theme. While this doesn't stop my development, this does drive me nuts.

I have another laptop with Xubuntu 16.04.1 (also XFCE4) that runs the same application, but with my GTK themes working properly. Does anyone know how I can fix this?


I had the same problem with LyX 2.1.4 on Xubuntu 16.04.1. There appears to be various solutions to this:

  1. Some suggest running the application with the -style gtk+ or -style gtk flags on the command line.

  2. Others suggest setting the environment variable QT_STYLE_OVERRIDE to either GTK, or GTK2, or GTK3.

  3. What worked for me personally was to edit ~/.config/Trolltech.conf (or /etc/xdg/Trolltech.conf) and add the following:

    [qt]  style=GTK+  

Further discussion on the ArchWiki.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »