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. Style changes when upgrading from 5.8 to 5.12
Forum Updated to NodeBB v4.3 + New Features

Style changes when upgrading from 5.8 to 5.12

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 1.8k Views 2 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
    J.Andre
    wrote on last edited by
    #1

    We recently upgrade our QT version from 5.8 to 5.12 and we’re noticing some unexpected style changes we’re hoping for help with.

    We have a dialog that previously had a white background and its controls used the flat modern Windows style. After the QT upgrade though, the dialog has a light gray background and its controls have a classic Windows styling. Oddly, the classic Windows styling is used even when running on a Mac.

    I’m very new to QT so I don’t have a good grasp of where to look for what could have caused the style change.

    Is this expected with upgrading from 5.8 to 5.12? Any recommendations on what to look into?

    Thank you!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Way back
      https://www.qt.io/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion
      The old styles were removed and left us with Fusion Style

      So going from 5.8 to 5.12 should not change the look as far as i know BUT
      if it reverts to sort old win32 style its often sign that the style plugin did not load as it should.

      Is this for a deployed application ? or also when running in Creator?

      Please try
      (in main.cpp)

      QApplication a(argc, argv);
      qDebug() << QStyleFactory::keys();
      a.setStyle(QStyleFactory::create("Fusion"));
      

      and see if that makes any difference.

      also check what
      qDebug() << QStyleFactory::keys();
      outputs.

      Mine says.
      ("windowsvista", "Windows", "Fusion")

      Im wondering if you simply dont have the Fusion plugin in your deployment folder/app

      1 Reply Last reply
      4
      • J Offline
        J Offline
        J.Andre
        wrote on last edited by
        #3

        It's for a deployed application that we're building with either Visual Studio or XCode. We haven't tried running it with Creator.

        Changing the style does get us a white background, however, we're still not seeing the modern Window style controls.

        When I output the QStyleFactory::keys(), I see "Windows" and "Fusion". I'm missing the "windowsvista" though. Any idea what might be needed to get that?

        JKSHJ 1 Reply Last reply
        0
        • J J.Andre

          It's for a deployed application that we're building with either Visual Studio or XCode. We haven't tried running it with Creator.

          Changing the style does get us a white background, however, we're still not seeing the modern Window style controls.

          When I output the QStyleFactory::keys(), I see "Windows" and "Fusion". I'm missing the "windowsvista" though. Any idea what might be needed to get that?

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @J-Andre said in Style changes when upgrading from 5.8 to 5.12:

          I'm missing the "windowsvista" though. Any idea what might be needed to get that?

          You must deploy the style plugin styles\qwindowsvistastyle.dll (similar to deploying the platform plugin platform\qwindows.dll)

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          J 1 Reply Last reply
          3
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @JKSH
            Thank you,
            But missing the qwindowsvistastyle on macOS should not make it look classic win32 or
            what do you think?

            • . Oddly, the classic Windows styling is used even when running on a Mac.
            JKSHJ 1 Reply Last reply
            0
            • mrjjM mrjj

              @JKSH
              Thank you,
              But missing the qwindowsvistastyle on macOS should not make it look classic win32 or
              what do you think?

              • . Oddly, the classic Windows styling is used even when running on a Mac.
              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @mrjj said in Style changes when upgrading from 5.8 to 5.12:

              But missing the qwindowsvistastyle on macOS should not make it look classic win32 or
              what do you think?

              • . Oddly, the classic Windows styling is used even when running on a Mac.

              I missed that bit; thanks for pointing it out!

              I would not have expected any macOS deployment to use a Windows-like style. @J-Andre, what style plugins are available on your macOS system?

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              mrjjM J 2 Replies Last reply
              1
              • JKSHJ JKSH

                @mrjj said in Style changes when upgrading from 5.8 to 5.12:

                But missing the qwindowsvistastyle on macOS should not make it look classic win32 or
                what do you think?

                • . Oddly, the classic Windows styling is used even when running on a Mac.

                I missed that bit; thanks for pointing it out!

                I would not have expected any macOS deployment to use a Windows-like style. @J-Andre, what style plugins are available on your macOS system?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @JKSH
                Hi
                That was also my first thought. Also, it sounds like it reverts to
                "Windows"
                like doing
                a.setStyle(QStyleFactory::create("Windows"));

                So i wonder if its due to Fusion not loading and then there is only "Windows"
                left to use.

                1 Reply Last reply
                0
                • JKSHJ JKSH

                  @mrjj said in Style changes when upgrading from 5.8 to 5.12:

                  But missing the qwindowsvistastyle on macOS should not make it look classic win32 or
                  what do you think?

                  • . Oddly, the classic Windows styling is used even when running on a Mac.

                  I missed that bit; thanks for pointing it out!

                  I would not have expected any macOS deployment to use a Windows-like style. @J-Andre, what style plugins are available on your macOS system?

                  J Offline
                  J Offline
                  J.Andre
                  wrote on last edited by
                  #8

                  @JKSH said in Style changes when upgrading from 5.8 to 5.12:

                  expected any macOS deployment to use a Wind

                  Strangely, the Mac seems to have "Windows" and "Fusion" as its options.
                  Before we made the upgrade, we had a "Macintosh" option as well.

                  I've confirmed that our Windows build was previously using the WindowsVista style, so I'll try bringing that back and hopefully it works.

                  1 Reply Last reply
                  0
                  • JKSHJ JKSH

                    @J-Andre said in Style changes when upgrading from 5.8 to 5.12:

                    I'm missing the "windowsvista" though. Any idea what might be needed to get that?

                    You must deploy the style plugin styles\qwindowsvistastyle.dll (similar to deploying the platform plugin platform\qwindows.dll)

                    J Offline
                    J Offline
                    J.Andre
                    wrote on last edited by
                    #9

                    @JKSH Thanks a lot for your help. The missing qwindowsvistastyle.dll (and Mac equivalent for the Mac build) was what we were missing.

                    mrjjM 1 Reply Last reply
                    1
                    • J J.Andre

                      @JKSH Thanks a lot for your help. The missing qwindowsvistastyle.dll (and Mac equivalent for the Mac build) was what we were missing.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @J-Andre

                      Hi Could you post what name for "Mac equivalent for the Mac build"
                      as its good to know.

                      J 1 Reply Last reply
                      0
                      • mrjjM mrjj

                        @J-Andre

                        Hi Could you post what name for "Mac equivalent for the Mac build"
                        as its good to know.

                        J Offline
                        J Offline
                        J.Andre
                        wrote on last edited by
                        #11

                        @mrjj Good call.
                        The Mac one was libqmacstyle.dylib

                        1 Reply Last reply
                        1

                        • Login

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