Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt5 to Qt6 style changes
Qt 6.11 is out! See what's new in the release blog

Qt5 to Qt6 style changes

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 69 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    james b-s
    wrote last edited by
    #1

    We are in the process of moving from qt5.15 to Qt6. In the process, we've noticed that the style has changed on linux, not so much on windows. This is documented in Qt documentation.

    We are tying to get the style on linux to look more like it did in Qt5 which is also the way it still looks on windows.

    What I have found is that I should be able to do this using QApplication::setStyle like this:

    QApplication::setStyle("fusion");
    

    I've tried "fusion" and "windows" and various other methods and styles. None of them seem to make a difference. What is the proper way of setting the linux style to match either what was in Qt5 or what it is on windows in Qt6?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      Which version of Qt are you using ? The one from your installer or the one from your distribution ?
      Note that OS specific styles are not available on all platforms because they contain OS specific code.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Which version of Qt are you using ? The one from your installer or the one from your distribution ?
        Note that OS specific styles are not available on all platforms because they contain OS specific code.

        J Offline
        J Offline
        james b-s
        wrote last edited by james b-s
        #3

        @SGaist 6.7-3. From an installer from Qt. We did not build it ourselves.

        Online it says that fusion should work to make things look like they did in Qt5.
        We are noticing background color changes, especially in various widgets, probably QLineEdit. The widget's background has changed from the white it is in Qt5 and qt6 windows, to a grey that makes it look readonly.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          james b-s
          wrote last edited by
          #4

          QApplication::setDesktopSettingsAware(false); seems to do what I want.

          1 Reply Last reply
          0
          • J james b-s has marked this topic as solved
          • J james b-s has marked this topic as solved
          • J Offline
            J Offline
            james b-s
            wrote last edited by
            #5

            I spoke too soon. This wasn't the proper solution. There are several other issues that need to be resolved and they are all documented as being resolved via the fusion style.

            1 Reply Last reply
            0
            • J james b-s has marked this topic as unsolved

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved