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. qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview
QtWS25 Last Chance

qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 3 Posters 3.6k Views
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on 30 Dec 2022, 06:57 last edited by A Former User
    #1

    When I use the QT creator application preview, it shows the preview via alt+shift+r precisely like the widget designer. When I compile and run the program via ctrl+r, the compiled app shows a window wider than the window and widgets designed in the designer. How can I solve this issue?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 20 Jan 2023, 20:05 last edited by
      #2

      I would guess there is something in your layout which expands the window. Simplify the ui file until the widget does no longer expand during runtime and/or remove all stuff which modifies the ui to find out what happens.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • C Offline
        C Offline
        ChrisW67
        wrote on 21 Jan 2023, 03:32 last edited by
        #3

        Can you post a picture of each?

        ? 1 Reply Last reply 21 Apr 2023, 06:15
        1
        • C ChrisW67
          21 Jan 2023, 03:32

          Can you post a picture of each?

          ? Offline
          ? Offline
          A Former User
          wrote on 21 Apr 2023, 06:15 last edited by
          #4

          @ChrisW67 Sorry I was away for some time.
          3c9d89de-6128-4d9e-8fcd-c56a86f5d64e-image.png
          this is the view of what I said.
          I use qt 6.4.1

          C 1 Reply Last reply 21 Apr 2023, 06:17
          0
          • ? A Former User
            21 Apr 2023, 06:15

            @ChrisW67 Sorry I was away for some time.
            3c9d89de-6128-4d9e-8fcd-c56a86f5d64e-image.png
            this is the view of what I said.
            I use qt 6.4.1

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 21 Apr 2023, 06:17 last edited by
            #5

            And what's different in your picture? The window icon?

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            ? 1 Reply Last reply 21 Apr 2023, 06:26
            0
            • C Christian Ehrlicher
              21 Apr 2023, 06:17

              And what's different in your picture? The window icon?

              ? Offline
              ? Offline
              A Former User
              wrote on 21 Apr 2023, 06:26 last edited by
              #6

              @Christian-Ehrlicher No, The window sizes without modification by the mouse are different and if I add some widgets, their sizes also will differ.
              As you see the preview window is smaller than the compiled window. the preview window is the same size as the preview window. the compiled window is larger than those two.
              I'm on Windows 11. along with QT 6.4.1 and QtCreator 10.0.0

              C 1 Reply Last reply 21 Apr 2023, 06:41
              0
              • ? A Former User
                21 Apr 2023, 06:26

                @Christian-Ehrlicher No, The window sizes without modification by the mouse are different and if I add some widgets, their sizes also will differ.
                As you see the preview window is smaller than the compiled window. the preview window is the same size as the preview window. the compiled window is larger than those two.
                I'm on Windows 11. along with QT 6.4.1 and QtCreator 10.0.0

                C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 21 Apr 2023, 06:41 last edited by
                #7

                You show an empty widget but now talk about other stuff - please be precise!
                Did you set the window size in the designer? Do oyu use layouts?
                Also remember that the QtCreator might use another style than the one used when you start your app (When you select 'Preview' in QtCreator you can select the style)

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                ? 1 Reply Last reply 21 Apr 2023, 06:47
                0
                • C Christian Ehrlicher
                  21 Apr 2023, 06:41

                  You show an empty widget but now talk about other stuff - please be precise!
                  Did you set the window size in the designer? Do oyu use layouts?
                  Also remember that the QtCreator might use another style than the one used when you start your app (When you select 'Preview' in QtCreator you can select the style)

                  ? Offline
                  ? Offline
                  A Former User
                  wrote on 21 Apr 2023, 06:47 last edited by
                  #8

                  @Christian-Ehrlicher
                  Here is one image with some widgets. As you said Qt can use the style in the preview. How can I select that?
                  And moreover, I wanted the compiled one to be the same as this preview. In this picture, I have used no layouts. I have set the window size and maximum size.
                  97e7cca0-264e-4506-b4c8-0598820bacee-image.png

                  C 1 Reply Last reply 21 Apr 2023, 06:49
                  0
                  • ? A Former User
                    21 Apr 2023, 06:47

                    @Christian-Ehrlicher
                    Here is one image with some widgets. As you said Qt can use the style in the preview. How can I select that?
                    And moreover, I wanted the compiled one to be the same as this preview. In this picture, I have used no layouts. I have set the window size and maximum size.
                    97e7cca0-264e-4506-b4c8-0598820bacee-image.png

                    C Offline
                    C Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on 21 Apr 2023, 06:49 last edited by
                    #9

                    Apart from the window size which might also change due to some coding later on I don't see a difference in the layout. Just another style as I already told you.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    ? 1 Reply Last reply 21 Apr 2023, 07:00
                    0
                    • C Christian Ehrlicher
                      21 Apr 2023, 06:49

                      Apart from the window size which might also change due to some coding later on I don't see a difference in the layout. Just another style as I already told you.

                      ? Offline
                      ? Offline
                      A Former User
                      wrote on 21 Apr 2023, 07:00 last edited by
                      #10

                      @Christian-Ehrlicher
                      As you see the span size of widgets is larger. Check the distance of the button text with its border.
                      So how can I make the compile layout like the preview layout? Where are the settings placed (I mean the address to the settings)?

                      C 1 Reply Last reply 21 Apr 2023, 07:03
                      0
                      • ? A Former User
                        21 Apr 2023, 07:00

                        @Christian-Ehrlicher
                        As you see the span size of widgets is larger. Check the distance of the button text with its border.
                        So how can I make the compile layout like the preview layout? Where are the settings placed (I mean the address to the settings)?

                        C Offline
                        C Offline
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote on 21 Apr 2023, 07:03 last edited by
                        #11

                        @Vahid-Ajallooeian said in qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview:

                        So how can I make the compile layout like the preview layout?

                        (When you select 'Preview' in QtCreator you can select the style)

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        ? 2 Replies Last reply 21 Apr 2023, 14:00
                        0
                        • C Christian Ehrlicher
                          21 Apr 2023, 07:03

                          @Vahid-Ajallooeian said in qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview:

                          So how can I make the compile layout like the preview layout?

                          (When you select 'Preview' in QtCreator you can select the style)

                          ? Offline
                          ? Offline
                          A Former User
                          wrote on 21 Apr 2023, 14:00 last edited by A Former User
                          #12

                          @Christian-Ehrlicher If you mean this view, all will have the same size as the designer, but the compiled app is larger. only some colors and effects would change.
                          4581a167-73eb-4047-b8ec-d26bf18e1d86-image.png

                          ? 1 Reply Last reply 22 Apr 2023, 02:15
                          0
                          • ? A Former User
                            21 Apr 2023, 14:00

                            @Christian-Ehrlicher If you mean this view, all will have the same size as the designer, but the compiled app is larger. only some colors and effects would change.
                            4581a167-73eb-4047-b8ec-d26bf18e1d86-image.png

                            ? Offline
                            ? Offline
                            A Former User
                            wrote on 22 Apr 2023, 02:15 last edited by A Former User
                            #13

                            @Vahid-Ajallooeian To those who encounter this issue, this is a matter of https://doc.qt.io/qt-6/highdpi.html and https://bugreports.qt.io/browse/QTBUG-110681. And I have not found how to manage it.

                            1 Reply Last reply
                            0
                            • C Christian Ehrlicher
                              21 Apr 2023, 07:03

                              @Vahid-Ajallooeian said in qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview:

                              So how can I make the compile layout like the preview layout?

                              (When you select 'Preview' in QtCreator you can select the style)

                              ? Offline
                              ? Offline
                              A Former User
                              wrote on 23 Apr 2023, 10:08 last edited by A Former User
                              #14

                              @Christian-Ehrlicher @ChrisW67 Thank you for your help. Here is an MVP of what shows the problem. Would you please tell me If I am doing layouts wrongly? Or should it be handled in other ways for high dpi management?
                              https://drive.google.com/file/d/1oPCpIctbh9lgRSMbFnIiTSZmLba0I3R2/view?usp=sharing

                              1 Reply Last reply
                              0
                              • System referenced this topic on 23 Apr 2023, 10:22

                              • Login

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