[PyQt] GTK/native OS theme not used by Qt 5.7

Rembrand at daxLAB rembrand at daxlab.com
Wed Dec 7 18:50:53 GMT 2016


Dear all

I'm switching over to Qt 5.7 (from Qt 5.5.1) and all seem to work fine except for one thing. It looks like I can't get the theme working that is used by the desktop environment itself (in this case Linux Mint Cinnamon).  I do fallback to Fusion style for my main window but QFileDialogs do not change at all and look horrible outdated (with brown icons from Gtk theme version 0.0). 

I do not have this problem with Qt 5.5.1 (where the theme looks good/is picked up by the Qt 5.5.1 application).

I would like to have theme support back as it was with 5.5.1 for all widgets and dialogs that are not part of my main window.  

I did experiment with the  QT_STYLE_OVERRIDE environment variable (assigning gtk, gtk2 as well as unsetting that again to nothing). As soon as I set that variable then my application gets Windows95 style buttons.  Only without the QT_STYLE_OVERRIDE variable I can get my main window back to Fusion (and still all other dialogs stay outdated).

Is there a way to correct this and make the GUI look like the Linux Desktop it runs on?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161207/15219e9f/attachment.html>


More information about the PyQt mailing list