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. Does creating apps without any layouts create any problems ?
Forum Update on Monday, May 27th 2025

Does creating apps without any layouts create any problems ?

Scheduled Pinned Locked Moved Solved General and Desktop
24 Posts 6 Posters 6.4k 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.
  • A Offline
    A Offline
    Ahti
    wrote on 8 Jun 2017, 09:24 last edited by Ahti 6 Aug 2017, 09:25
    #1

    HI
    I wanna know if it would create any problem when i create an app without using any layouts like Gridlayout, Horizontal layout etc.

    thanks.

    V J 3 Replies Last reply 8 Jun 2017, 10:41
    0
    • A Ahti
      8 Jun 2017, 09:24

      HI
      I wanna know if it would create any problem when i create an app without using any layouts like Gridlayout, Horizontal layout etc.

      thanks.

      V Offline
      V Offline
      Venkatesh V
      wrote on 8 Jun 2017, 10:41 last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • A Ahti
        8 Jun 2017, 09:24

        HI
        I wanna know if it would create any problem when i create an app without using any layouts like Gridlayout, Horizontal layout etc.

        thanks.

        V Offline
        V Offline
        Venkatesh V
        wrote on 8 Jun 2017, 10:43 last edited by
        #3

        @Ahti

        Hi,
        actually No problem, but, you wont be able to align widget properly without layouts.

        A 1 Reply Last reply 8 Jun 2017, 10:59
        2
        • P Offline
          P Offline
          Pradeep Kumar
          wrote on 8 Jun 2017, 10:44 last edited by
          #4

          Hi,

          @Ahti

          for aligning and the app to look more user friendly, alignment is necessary so go for layouts,

          Thanks,

          Pradeep Kumar
          Qt,QML Developer

          1 Reply Last reply
          1
          • A Ahti
            8 Jun 2017, 09:24

            HI
            I wanna know if it would create any problem when i create an app without using any layouts like Gridlayout, Horizontal layout etc.

            thanks.

            J Online
            J Online
            jsulm
            Lifetime Qt Champion
            wrote on 8 Jun 2017, 10:55 last edited by
            #5

            @Ahti If you do not use layouts and don't lay out your widgets manually then the widgets in your app will not adjust when resizing your app. Just create a simple app with some widgets without using layouts start it and see what will happen if you resize it. Besides that there are no issues.

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

            1 Reply Last reply
            3
            • P Offline
              P Offline
              Pradeep Kumar
              wrote on 8 Jun 2017, 10:57 last edited by
              #6

              And if u want to use the app in all platfroms, its necessary for you to give layouts and to be nice.

              Thanks,

              Pradeep Kumar
              Qt,QML Developer

              1 Reply Last reply
              0
              • V Venkatesh V
                8 Jun 2017, 10:43

                @Ahti

                Hi,
                actually No problem, but, you wont be able to align widget properly without layouts.

                A Offline
                A Offline
                Ahti
                wrote on 8 Jun 2017, 10:59 last edited by Ahti 6 Aug 2017, 11:00
                #7

                @Venkatesh-V @Pradeep-Kumar Would the app go out of alignment when installed on different pc with different monitor resolution ? i mean if i am creating the app in pc with 1440X900 resolution but somehow i try to run it on a different pc with resolution of 1920X1080 would it get out of alignment ??

                J 1 Reply Last reply 8 Jun 2017, 11:05
                0
                • A Ahti
                  8 Jun 2017, 10:59

                  @Venkatesh-V @Pradeep-Kumar Would the app go out of alignment when installed on different pc with different monitor resolution ? i mean if i am creating the app in pc with 1440X900 resolution but somehow i try to run it on a different pc with resolution of 1920X1080 would it get out of alignment ??

                  J Online
                  J Online
                  J.Hilk
                  Moderators
                  wrote on 8 Jun 2017, 11:05 last edited by
                  #8

                  @Ahti
                  depends,
                  if your app is in full screen mode, then yes, you would have a lot of free space on the bottom and right hand side.

                  if Windowed, no change.

                  If the target display has a smaller resolution, you're entierly out of luck.

                  Trust me, if you don't want mental problems a few weeks into development, you're better of using Layouts, or you create your own align function, that moves/resizes your widgets.


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  A 1 Reply Last reply 8 Jun 2017, 11:07
                  3
                  • J J.Hilk
                    8 Jun 2017, 11:05

                    @Ahti
                    depends,
                    if your app is in full screen mode, then yes, you would have a lot of free space on the bottom and right hand side.

                    if Windowed, no change.

                    If the target display has a smaller resolution, you're entierly out of luck.

                    Trust me, if you don't want mental problems a few weeks into development, you're better of using Layouts, or you create your own align function, that moves/resizes your widgets.

                    A Offline
                    A Offline
                    Ahti
                    wrote on 8 Jun 2017, 11:07 last edited by
                    #9

                    @J.Hilk it has a fixed size. resize option is disabled.

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      Pradeep Kumar
                      wrote on 8 Jun 2017, 11:10 last edited by
                      #10

                      if it is having fixed size, then based on the requirement u achieve, and in all the platforms it will give issue.

                      Thanks,

                      Pradeep Kumar
                      Qt,QML Developer

                      A 1 Reply Last reply 8 Jun 2017, 11:13
                      1
                      • P Pradeep Kumar
                        8 Jun 2017, 11:10

                        if it is having fixed size, then based on the requirement u achieve, and in all the platforms it will give issue.

                        Thanks,

                        A Offline
                        A Offline
                        Ahti
                        wrote on 8 Jun 2017, 11:13 last edited by
                        #11

                        @Pradeep-Kumar if i use layouts then no matter if its fixed size or not it won't give any issues right ?

                        E V J 3 Replies Last reply 8 Jun 2017, 11:38
                        0
                        • A Ahti
                          8 Jun 2017, 11:13

                          @Pradeep-Kumar if i use layouts then no matter if its fixed size or not it won't give any issues right ?

                          E Offline
                          E Offline
                          Eeli K
                          wrote on 8 Jun 2017, 11:38 last edited by
                          #12

                          @Ahti We can't of course guarantee you won't run into problems with Layouts but you will have much less problems with them than without. Of course you have to learn to use them, but that time and effort is well spent. In general you will avoid many problems later if you just make your UIs more general and responsive with Layouts, no matter what your needs are at the moment.

                          I suggest learning the Layout concepts with Qt Creator Design view. Add a Layout and some items into it and play with the Layout's own properties and the Layout attached properties of the items inside the Layout. Then try nested Layouts. Even if you prefer coding UIs by hand it's often easier to create a mockup using the Design view and then continue manually.

                          1 Reply Last reply
                          2
                          • A Ahti
                            8 Jun 2017, 11:13

                            @Pradeep-Kumar if i use layouts then no matter if its fixed size or not it won't give any issues right ?

                            V Offline
                            V Offline
                            Venkatesh V
                            wrote on 8 Jun 2017, 11:40 last edited by
                            #13

                            @Ahti
                            if you give fixed size based on resolution of the different devices, then i wont give any issues but if you directly give the size it wont align properly.

                            1 Reply Last reply
                            3
                            • P Offline
                              P Offline
                              Pradeep Kumar
                              wrote on 8 Jun 2017, 11:46 last edited by Pradeep Kumar 6 Aug 2017, 11:47
                              #14

                              Hi,

                              @Ahti

                              u need to look into consideration of all platforms, and then move ahead, not only using fixed sizes for apps, later point of stage, requirement may vary, in that point re doing everything, time effort and requirement, come into picture so now plan well on how u design .

                              Thanks,

                              Pradeep Kumar
                              Qt,QML Developer

                              A 1 Reply Last reply 8 Jun 2017, 13:05
                              1
                              • A Ahti
                                8 Jun 2017, 11:13

                                @Pradeep-Kumar if i use layouts then no matter if its fixed size or not it won't give any issues right ?

                                J Online
                                J Online
                                jsulm
                                Lifetime Qt Champion
                                wrote on 8 Jun 2017, 12:46 last edited by
                                #15

                                @Ahti What is the background of your question? You don't want to use layouts? If so why?

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

                                A 1 Reply Last reply 8 Jun 2017, 13:02
                                1
                                • J jsulm
                                  8 Jun 2017, 12:46

                                  @Ahti What is the background of your question? You don't want to use layouts? If so why?

                                  A Offline
                                  A Offline
                                  Ahti
                                  wrote on 8 Jun 2017, 13:02 last edited by
                                  #16

                                  @jsulm I was working on a project in my old pc but now i brought a new pc and i moved the same project in my new pc ( which has a different resolution ) but now when i run the same project on my new pc all the text and some widgets get out of alignment and for that reason i had left that project as its. I didn't used any layout in the project so now i thought maybe its because of these layouts why it looks so ugly.

                                  J J 2 Replies Last reply 8 Jun 2017, 13:10
                                  0
                                  • P Pradeep Kumar
                                    8 Jun 2017, 11:46

                                    Hi,

                                    @Ahti

                                    u need to look into consideration of all platforms, and then move ahead, not only using fixed sizes for apps, later point of stage, requirement may vary, in that point re doing everything, time effort and requirement, come into picture so now plan well on how u design .

                                    Thanks,

                                    A Offline
                                    A Offline
                                    Ahti
                                    wrote on 8 Jun 2017, 13:05 last edited by
                                    #17

                                    @Pradeep-Kumar but for desktops the minimum resolution is 800600 and i have put the fixed size to 600400 and i also check if the resolution is below that then the app should throw error saying "resolution not supported"

                                    1 Reply Last reply
                                    0
                                    • A Ahti
                                      8 Jun 2017, 13:02

                                      @jsulm I was working on a project in my old pc but now i brought a new pc and i moved the same project in my new pc ( which has a different resolution ) but now when i run the same project on my new pc all the text and some widgets get out of alignment and for that reason i had left that project as its. I didn't used any layout in the project so now i thought maybe its because of these layouts why it looks so ugly.

                                      J Online
                                      J Online
                                      J.Hilk
                                      Moderators
                                      wrote on 8 Jun 2017, 13:10 last edited by
                                      #18

                                      @Ahti said in Does creating apps without any layouts create any problems ?:

                                      @jsulm I was working on a project in my old pc but now i brought a new pc and i moved the same project in my new pc ( which has a different resolution ) but now when i run the same project on my new pc all the text and some widgets get out of alignment and for that reason i had left that project as its. I didn't used any layout in the project so now i thought maybe its because of these layouts why it looks so ugly.

                                      Seeing this, 2 things come to mind.

                                      Your new PC has a high-dpi (dots per inch) display or a different scaling factor is set for your display.

                                      Either way

                                      QApplication::setAttribute(Qt::AA_Use96Dpi);
                                      

                                      before

                                      QApplication a(argc, argv);
                                      

                                      should do it as a quick and dirty workaround. :-)


                                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                      Q: What's that?
                                      A: It's blue light.
                                      Q: What does it do?
                                      A: It turns blue.

                                      A 2 Replies Last reply 8 Jun 2017, 13:30
                                      2
                                      • J J.Hilk
                                        8 Jun 2017, 13:10

                                        @Ahti said in Does creating apps without any layouts create any problems ?:

                                        @jsulm I was working on a project in my old pc but now i brought a new pc and i moved the same project in my new pc ( which has a different resolution ) but now when i run the same project on my new pc all the text and some widgets get out of alignment and for that reason i had left that project as its. I didn't used any layout in the project so now i thought maybe its because of these layouts why it looks so ugly.

                                        Seeing this, 2 things come to mind.

                                        Your new PC has a high-dpi (dots per inch) display or a different scaling factor is set for your display.

                                        Either way

                                        QApplication::setAttribute(Qt::AA_Use96Dpi);
                                        

                                        before

                                        QApplication a(argc, argv);
                                        

                                        should do it as a quick and dirty workaround. :-)

                                        A Offline
                                        A Offline
                                        Ahti
                                        wrote on 8 Jun 2017, 13:30 last edited by
                                        #19
                                        This post is deleted!
                                        1 Reply Last reply
                                        0
                                        • J J.Hilk
                                          8 Jun 2017, 13:10

                                          @Ahti said in Does creating apps without any layouts create any problems ?:

                                          @jsulm I was working on a project in my old pc but now i brought a new pc and i moved the same project in my new pc ( which has a different resolution ) but now when i run the same project on my new pc all the text and some widgets get out of alignment and for that reason i had left that project as its. I didn't used any layout in the project so now i thought maybe its because of these layouts why it looks so ugly.

                                          Seeing this, 2 things come to mind.

                                          Your new PC has a high-dpi (dots per inch) display or a different scaling factor is set for your display.

                                          Either way

                                          QApplication::setAttribute(Qt::AA_Use96Dpi);
                                          

                                          before

                                          QApplication a(argc, argv);
                                          

                                          should do it as a quick and dirty workaround. :-)

                                          A Offline
                                          A Offline
                                          Ahti
                                          wrote on 8 Jun 2017, 13:57 last edited by Ahti 6 Aug 2017, 14:00
                                          #20

                                          @J.Hilk

                                          this is how my app looks on pc with full hd ( 1920 X 1080 ) pc
                                          https://postimg.org/image/bnidz0r2r/
                                          this is how my app looks on pc with hd ( 1440 X 900 ) pc
                                          https://postimg.org/image/96mvvllbj/

                                          1 Reply Last reply
                                          0

                                          4/24

                                          8 Jun 2017, 10:44

                                          topic:navigator.unread, 20
                                          • Login

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