Type: Technical task
Status: In Progress
Priority: P2: Important
Fix Version/s: None
Component/s: GUI: Look'n'Feel
Linux Mint 18.2 Cinnamon (64bit)
Linux Mint 18.2 MATE (64bit)
Linux Mint 18.2 Xfce (64bit)
Linux Mint 18.2 KDE (64bit)
Fedora 26 GNOME3 (64bit)
Ubuntu 17.05 Unit (64bit)
Debian 9.1.0 Cinnamon (64bit)
openSUSE Leap 42.3 KDE (64bit)
GTK theme emulation worked in version of Qt that came with the qgtk2 plugin (i.e. versions up to Qt 5.6.2). However, since the introduction of the qgtk3 plugin in Qt 5.8.0, GTK theme emulation has not worked on most major Linux distributions and desktop environments. I have tested on a variety of popular distributions and desktop environments, and have found that the only desktop environment where GTK theme emulation works is KDE. Below I have summarised the results of my testing and provided screenshots to show that GTK emulation is not working in 5.9.1.
On each distribution I installed Qt 5.6.2 (the last version that came with qgtk2) from qt-opensource-linux-x64-5.6.2.run, and Qt 5.9.1 (with qtk3) from qt-opensource-linux-x64-5.9.1.run, with all installation settings left at the default. I then opened a simple GUI application in the bundled Qt Creator (Qt Creator 4.0.3 with Qt 5.6.2, and Qt Creator 4.3.1 with Qt 5.9.1), ran the application and took screenshots. The Qt 5.6.2 screenshots show the GTK theme emulation working correctly, and thus how the theme should look, while the Qt 5.9.1 screenshots show that GTK theme emulation is not working.
On each distribution I also checked whether theme emulation worked correctly in Qt Creator 4.0.3 (built with Qt 5.6.2) and Qt Creator 4.3.1 (built with Qt 5.9.1). Theme emulation failing in Qt Creator clearly shows it's a Qt issue rather than an issue with my test program.
Testing with the "Mint-X", "Mint-Y-Dark" and "HighContrast" themes, I found that GTK theme emulation failed with Qt 5.9.1 (qgtk3), but worked with the older Qt 5.6.2 (qgtk2). This can be seen in the attachments LinuxMint182Cinnamon.png, LinuxMint182MATE.png and LinuxMint182Xfce.png.
Testing Qt Creator, I found that GTK theme emulation did not work in Qt Creator 4.3.1 (built with Qt 5.9.1), but it did work in Qt Creator 4.0.3 (built with Qt 5.6.2), as shown in the attachment LinuxMint182CinQtCreator.png.
I tested with the built in "Adwaita", "Adwaita-dark" and "HighContrast" themes, I once again found that theme emulation failed with Qt 5.9.1 (qgtk3), but worked with the older Qt 5.6.2 (qgtk2), as shown in the attachment Fedora26GNOME3.png.
Testing Qt creator I again found that GTK theme emulation did not work in Qt Creator 4.3.1 (built with Qt 5.9.1), but worked fine in the older Qt Creator 4.0.3 (built with Qt 5.6.2).
Testing with the "Ambiance", "Radiance" and "High Contrast" themes, once again Qt 5.9.1 (qgtk3) did not emulate the system GTK theme, but Qt 5.6.2 (qgtk2) did, as shown in the attachment Ubuntu1704Unity.png. Qt Creator 4.3.1 again did not emulate the GTK theme, while Qt Creator 4.0.3 did.
Testing with the "Adwaita", "BlackMATE" and "ContrastHighInverse" Qt 5.9.1 (qgtk3) again failed, while Qt 5.6.2 (qgtk2) worked, as shown in attachment Debian910Cinnamon.png. Qt Creator was the same with 4.3.1 not working, while 4.0.3 worked fine.
Testing with KDE, I found that theme emulation worked with both Qt 5.9.1 (qgtk3) and Qt 5.6.2 (qgtk2).
Testing shows that GTK theme emulation does not work with Qt 5.9.1 on many of the major distributions and desktop environments, with the exception of KDE. KDE is, of course, written with Qt and as such they may have made additional provisions to ensure that GTK emulation works correctly.
I have previously tested Qt 5.8.0, Qt 5.8.1 and Qt 5.9.0 on a variety of distributions with the same result, i.e. GTK theme emulation didn't work. I had also tested Qt 5.7.0, and that too did not work, but that was because it came with no qgtk plugin at all.
Without GTK theme emulation applications appear defective, so I feel that it is very important that GTK theme emulation works correctly.
|For Gerrit Dashboard: QTBUG-62510|
|419545,28||Make QFusionStyle GTK sensitive||dev||qt/qtbase||Status: NEW||0||0|
|422605,63||Make QGnomeTheme GTK2 sensitive||dev||qt/qtbase||Status: DEFERRED||0||0|
|434838,12||CMake: Add gtk2 and linked-gtk2 configure features||dev||qt/qtbase||Status: DEFERRED||0||0|
|434839,3||Add wrapper for GTK2 CMake finder||dev||qt/qtbase||Status: ABANDONED||0||0|
|434840,18||Implement json interface for GTK2 palette mapping||dev||qt/qtbase||Status: DEFERRED||0||0|
|437950,37||Re-implement palette, standardPixmap, file icons, fonts in QGtk3Theme||dev||qt/qtbase||Status: MERGED||-1||0|