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 Creator WYSIWYG isn't giving a true representation

Qt Creator WYSIWYG isn't giving a true representation

Scheduled Pinned Locked Moved Unsolved General and Desktop
39 Posts 7 Posters 4.7k 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.
  • jsulmJ jsulm

    @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

    I'm more concerned about the labels being resize and not fitting

    Sounds more like layout issue than theme. What happens if you resize the window/widget in designer?
    Also, does your app look like any other app on the same system?

    SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #5

    @jsulm , whilst viewing in designer the form fits perfectly and everything looks great. The look of the controls do look the same as other native applications, however the point I'm trying to make is that forms in Qt Creator shouldn't look different in design to how they will when compiled.

    Qt Creator should present the forms in the way they will look when running on the host, which currently is very different. I would understand if I was viewing the same application on a different OS, but its the same host, not a different OS and not a different system.

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      @jsulm , thank you, but the point is I want to design the application in Qt to look the same as it will when running, presently in Qt Creator everything looks find, but when running as you can see in the screen shots it does not.

      I'm more concerned about the labels being resize and not fitting. How can I set-up Qt Creator to match what will be in the final application when running?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #6

      @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

      How can I set-up Qt Creator to match what will be in the final application when running?

      Layouts apply first when you run your app. So, what you see in QtCreator's Design mode may look different from what your app / widgets really look on runtime.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      SPlattenS jsulmJ 2 Replies Last reply
      0
      • SPlattenS SPlatten

        @jsulm , whilst viewing in designer the form fits perfectly and everything looks great. The look of the controls do look the same as other native applications, however the point I'm trying to make is that forms in Qt Creator shouldn't look different in design to how they will when compiled.

        Qt Creator should present the forms in the way they will look when running on the host, which currently is very different. I would understand if I was viewing the same application on a different OS, but its the same host, not a different OS and not a different system.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #7

        @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

        whilst viewing in designer the form fits perfectly and everything looks great

        That's why I asked what happens if you resize the form in designer? Does everything still fit?

        It would make sense if QtDesigner would use the platform theme by default, but this is something for a change request on Qt bug-tracker.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        SPlattenS 1 Reply Last reply
        0
        • jsulmJ jsulm

          @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

          whilst viewing in designer the form fits perfectly and everything looks great

          That's why I asked what happens if you resize the form in designer? Does everything still fit?

          It would make sense if QtDesigner would use the platform theme by default, but this is something for a change request on Qt bug-tracker.

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #8

          @jsulm, Given the age and maturity of Qt Creator I would expect this to be the default behaviour.

          Kind Regards,
          Sy

          jsulmJ 1 Reply Last reply
          0
          • Pl45m4P Pl45m4

            @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

            How can I set-up Qt Creator to match what will be in the final application when running?

            Layouts apply first when you run your app. So, what you see in QtCreator's Design mode may look different from what your app / widgets really look on runtime.

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #9

            @Pl45m4 , why? When I use an WYSIWYG editor I expect the output to be exactly as I design, unless I resize it.

            Kind Regards,
            Sy

            Pl45m4P 1 Reply Last reply
            0
            • SPlattenS SPlatten

              @jsulm, Given the age and maturity of Qt Creator I would expect this to be the default behaviour.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #10

              @SPlatten Since I'm not a QtDesigner developer I can't comment on the reasons for that, you can ask on the Qt mailing list.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • Pl45m4P Pl45m4

                @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                How can I set-up Qt Creator to match what will be in the final application when running?

                Layouts apply first when you run your app. So, what you see in QtCreator's Design mode may look different from what your app / widgets really look on runtime.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #11

                @Pl45m4 said in Qt Creator WYSIWYG isn't giving a true representation:

                Layouts apply first when you run your app

                They also take effect in designer (try to resize the form with properly set layouts).

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                Pl45m4P 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Pl45m4 said in Qt Creator WYSIWYG isn't giving a true representation:

                  Layouts apply first when you run your app

                  They also take effect in designer (try to resize the form with properly set layouts).

                  Pl45m4P Offline
                  Pl45m4P Offline
                  Pl45m4
                  wrote on last edited by
                  #12

                  @jsulm said in Qt Creator WYSIWYG isn't giving a true representation:

                  They also take effect in designer (try to resize the form with properly set layouts).

                  But nevertheless the behavior / look is or feels a bit different in QtDesigner (from my experience)


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  1 Reply Last reply
                  0
                  • SPlattenS SPlatten

                    @Pl45m4 , why? When I use an WYSIWYG editor I expect the output to be exactly as I design, unless I resize it.

                    Pl45m4P Offline
                    Pl45m4P Offline
                    Pl45m4
                    wrote on last edited by
                    #13

                    @SPlatten

                    What layouts do you have here and how are your sizeHints and stretches configured?


                    If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                    ~E. W. Dijkstra

                    SPlattenS 1 Reply Last reply
                    0
                    • Pl45m4P Pl45m4

                      @SPlatten

                      What layouts do you have here and how are your sizeHints and stretches configured?

                      SPlattenS Offline
                      SPlattenS Offline
                      SPlatten
                      wrote on last edited by
                      #14

                      @Pl45m4, the main layout is a QGridLayout, however the controls that I'm having a problem with are not in the layout they children of the centralWidget.

                      Kind Regards,
                      Sy

                      jsulmJ Pl45m4P 2 Replies Last reply
                      0
                      • SPlattenS SPlatten

                        @Pl45m4, the main layout is a QGridLayout, however the controls that I'm having a problem with are not in the layout they children of the centralWidget.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #15

                        @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                        however the controls that I'm having a problem with are not in the layout they children of the centralWidget.

                        That's why I asked (two times) what happens if you resize the form in designer, but you still did not answer...

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        SPlattenS 1 Reply Last reply
                        1
                        • jsulmJ jsulm

                          @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                          however the controls that I'm having a problem with are not in the layout they children of the centralWidget.

                          That's why I asked (two times) what happens if you resize the form in designer, but you still did not answer...

                          SPlattenS Offline
                          SPlattenS Offline
                          SPlatten
                          wrote on last edited by
                          #16

                          @jsulm , nothing happens if I resize in the designer.

                          Kind Regards,
                          Sy

                          jsulmJ 1 Reply Last reply
                          0
                          • SPlattenS SPlatten

                            @jsulm , nothing happens if I resize in the designer.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #17

                            @SPlatten So, this is indeed a problem with layouts (or lack of layouts) and not themes...

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            1
                            • SPlattenS SPlatten

                              @Pl45m4, the main layout is a QGridLayout, however the controls that I'm having a problem with are not in the layout they children of the centralWidget.

                              Pl45m4P Offline
                              Pl45m4P Offline
                              Pl45m4
                              wrote on last edited by Pl45m4
                              #18

                              @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                              are not in the layout they children of the centralWidget.

                              So your "Select Trainee" label is floating around? :)
                              Then you don't have to wonder why other widgets cover it.


                              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                              ~E. W. Dijkstra

                              SPlattenS 1 Reply Last reply
                              0
                              • Pl45m4P Pl45m4

                                @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                                are not in the layout they children of the centralWidget.

                                So your "Select Trainee" label is floating around? :)
                                Then you don't have to wonder why other widgets cover it.

                                SPlattenS Offline
                                SPlattenS Offline
                                SPlatten
                                wrote on last edited by SPlatten
                                #19

                                @Pl45m4 , On this form there are four buttons to the left of the label, these are all of a specific size and position, when viewing in designer everything looks great and nothing is wrong.

                                When I launch the application I am not resizing or moving anything, it initial state looks very different from how it did in designer.

                                No other widgets are covering it, the font size and size of the label is different.

                                Kind Regards,
                                Sy

                                Pl45m4P 1 Reply Last reply
                                0
                                • SPlattenS SPlatten

                                  @Pl45m4 , On this form there are four buttons to the left of the label, these are all of a specific size and position, when viewing in designer everything looks great and nothing is wrong.

                                  When I launch the application I am not resizing or moving anything, it initial state looks very different from how it did in designer.

                                  No other widgets are covering it, the font size and size of the label is different.

                                  Pl45m4P Offline
                                  Pl45m4P Offline
                                  Pl45m4
                                  wrote on last edited by
                                  #20

                                  @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                                  No other widgets are covering it

                                  I thought the button on the left is covering your text...

                                  the font size and size of the label is different.

                                  Because the size of your label is not expanding with its content, because no layout will stretch your label :)
                                  You could try to set a minimum size in QtDesigner that fits your content.


                                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                                  ~E. W. Dijkstra

                                  SPlattenS 1 Reply Last reply
                                  0
                                  • Pl45m4P Pl45m4

                                    @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                                    No other widgets are covering it

                                    I thought the button on the left is covering your text...

                                    the font size and size of the label is different.

                                    Because the size of your label is not expanding with its content, because no layout will stretch your label :)
                                    You could try to set a minimum size in QtDesigner that fits your content.

                                    SPlattenS Offline
                                    SPlattenS Offline
                                    SPlatten
                                    wrote on last edited by
                                    #21

                                    @Pl45m4 , thank you, I've dropped in a Horizontal Layout and added the top row of controls to that, the application is better, although the presentation in designer is still not the same and whilst it's perfect in designer, the application still has a label that isn't displaying all characters.

                                    Kind Regards,
                                    Sy

                                    Pl45m4P 1 Reply Last reply
                                    0
                                    • SPlattenS SPlatten

                                      @Pl45m4 , thank you, I've dropped in a Horizontal Layout and added the top row of controls to that, the application is better, although the presentation in designer is still not the same and whilst it's perfect in designer, the application still has a label that isn't displaying all characters.

                                      Pl45m4P Offline
                                      Pl45m4P Offline
                                      Pl45m4
                                      wrote on last edited by
                                      #22

                                      @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                                      the application still has a label that isn't displaying all characters.

                                      Weird. Shouldn't be the case, if done right.


                                      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                                      ~E. W. Dijkstra

                                      SPlattenS 1 Reply Last reply
                                      0
                                      • Pl45m4P Pl45m4

                                        @SPlatten said in Qt Creator WYSIWYG isn't giving a true representation:

                                        the application still has a label that isn't displaying all characters.

                                        Weird. Shouldn't be the case, if done right.

                                        SPlattenS Offline
                                        SPlattenS Offline
                                        SPlatten
                                        wrote on last edited by
                                        #23

                                        @Pl45m4 , in fact every thing I've tried still results in the label showing everything except the first letter "S".

                                        Kind Regards,
                                        Sy

                                        Pl45m4P 1 Reply Last reply
                                        0
                                        • SPlattenS SPlatten

                                          @Pl45m4 , in fact every thing I've tried still results in the label showing everything except the first letter "S".

                                          Pl45m4P Offline
                                          Pl45m4P Offline
                                          Pl45m4
                                          wrote on last edited by
                                          #24

                                          @SPlatten

                                          I believe there's still something wrong. Show your layout please (the layout / widget setup and the result you get)


                                          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                                          ~E. W. Dijkstra

                                          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