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. Ui looks different in release mode

Ui looks different in release mode

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.5k Views 3 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.
  • B Offline
    B Offline
    bam500
    wrote on last edited by bam500
    #1

    When I compile my project with Qt 5.10.1 in release mode, the UI looks different :

    In debug mode :

    0_1534930731938_2018-08-22_11-38-21.png

    In release mode :

    0_1534930776215_2018-08-22_11-34-50.png

    Has anyone an idea of why it looks different when compiled in release mode ?

    EDIT : I have this issue since I compile with Qt 5.10.1, it didn't occur with Qt 5.4.2

    K 1 Reply Last reply
    0
    • B bam500

      When I compile my project with Qt 5.10.1 in release mode, the UI looks different :

      In debug mode :

      0_1534930731938_2018-08-22_11-38-21.png

      In release mode :

      0_1534930776215_2018-08-22_11-34-50.png

      Has anyone an idea of why it looks different when compiled in release mode ?

      EDIT : I have this issue since I compile with Qt 5.10.1, it didn't occur with Qt 5.4.2

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @bam500

      You need to give more information on OS and eventually compiler.

      Do you have minimal compilable example for demostration?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • B Offline
        B Offline
        bam500
        wrote on last edited by
        #3

        I use Windows 7 and I have compiled it with MinGW 5.3 32 bits.

        Well I cannot really share the code since it's a commercial application

        K 1 Reply Last reply
        0
        • B bam500

          I use Windows 7 and I have compiled it with MinGW 5.3 32 bits.

          Well I cannot really share the code since it's a commercial application

          K Offline
          K Offline
          koahnig
          wrote on last edited by koahnig
          #4

          @bam500

          You should try to replicate it with a minimal project created on your machine, which does show the same phenomen. Typically a short demo based on Qt creator templates would demostrate.

          Otherwise I would expect that this is due to some macro switches within your code where the style is changed differently depending on macro setting for release and debug.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          4
          • B Offline
            B Offline
            bam500
            wrote on last edited by
            #5

            I don't have this issue with a minimal project, the QPushButton looks the same in both debug and release mode.
            I have omitted to say that I used to compile my project with Qt 5.4.2 and didn't have the issue. It occured when I compiled it with Qt 5.10.1

            mrjjM 1 Reply Last reply
            0
            • B bam500

              I don't have this issue with a minimal project, the QPushButton looks the same in both debug and release mode.
              I have omitted to say that I used to compile my project with Qt 5.4.2 and didn't have the issue. It occured when I compiled it with Qt 5.10.1

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

              @bam500
              Do you use stylesheets?

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bam500
                wrote on last edited by
                #7

                Yes I apply stylesheets to all my widgets

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bam500
                  wrote on last edited by bam500
                  #8

                  I have finally found the reason :

                  With Qt 5.10.1 you need to add the dll : plugins/styles/qwindowsvistastyle.dll at the root of your project.

                  Now it is working fine!

                  Here's where I got inspired : https://github.com/mxe/mxe/issues/2037 ;-)

                  Thanks all for your replies

                  1 Reply Last reply
                  3

                  • Login

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