Details

    • Technical task
    • Resolution: Fixed
    • P2: Important
    • 6.5.0
    • GUI: Look'n'Feel
    • Linux/X11
    • 4ca8a6840 (dev)

    Description

      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.

      Testing Method

      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.

      Linux Mint 18.2 Cinnamon, MATE, Xfce

      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.

      Fedora 26 GNOME 3

      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).

      Ubuntu 17.04 Unity

      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.

      Debian 9.1.0 Cinnamon

      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.

      Linux Mint 18.2 KDE and openSUSE Leap 42.3 KDE

      Testing with KDE, I found that theme emulation worked with both Qt 5.9.1 (qgtk3) and Qt 5.6.2 (qgtk2).

      Conclusion

      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.

      Attachments

        1. Debian910Cinnamon.png
          Debian910Cinnamon.png
          48 kB
        2. Fedora26GNOME3.png
          Fedora26GNOME3.png
          61 kB
        3. LinuxMint182Cinnamon.png
          LinuxMint182Cinnamon.png
          48 kB
        4. LinuxMint182CinQtCreator.png
          LinuxMint182CinQtCreator.png
          196 kB
        5. LinuxMint182MATE.png
          LinuxMint182MATE.png
          50 kB
        6. LinuxMint182Xfce.png
          LinuxMint182Xfce.png
          51 kB
        7. Ubuntu1704Unity.png
          Ubuntu1704Unity.png
          104 kB

        Issue Links

          Activity

            People

              axelspoerl Axel Spoerl
              inviska Richard Craig
              Votes:
              5 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: