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 ?

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.
  • AhtiA Ahti

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

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on 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

    AhtiA 1 Reply Last reply
    1
    • jsulmJ jsulm

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

      AhtiA Offline
      AhtiA Offline
      Ahti
      wrote on 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.HilkJ jsulmJ 2 Replies Last reply
      0
      • Pradeep KumarP Pradeep Kumar

        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,

        AhtiA Offline
        AhtiA Offline
        Ahti
        wrote on 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
        • AhtiA Ahti

          @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.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on 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.

          AhtiA 2 Replies Last reply
          2
          • J.HilkJ J.Hilk

            @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. :-)

            AhtiA Offline
            AhtiA Offline
            Ahti
            wrote on last edited by
            #19
            This post is deleted!
            1 Reply Last reply
            0
            • J.HilkJ J.Hilk

              @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. :-)

              AhtiA Offline
              AhtiA Offline
              Ahti
              wrote on last edited by Ahti
              #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
              • AhtiA Ahti

                @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.

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

                @Ahti That is a perfect example why you SHOULD use layouts and what happens if you don't.
                Just use layouts (it is really not hard) and you will not have such problems.

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

                AhtiA 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @Ahti That is a perfect example why you SHOULD use layouts and what happens if you don't.
                  Just use layouts (it is really not hard) and you will not have such problems.

                  AhtiA Offline
                  AhtiA Offline
                  Ahti
                  wrote on last edited by
                  #22

                  @jsulm after using gridlayout the text appears small why ? have a look:

                  https://postimg.org/image/axyj3cyor/

                  Venkatesh VV jsulmJ 2 Replies Last reply
                  0
                  • AhtiA Ahti

                    @jsulm after using gridlayout the text appears small why ? have a look:

                    https://postimg.org/image/axyj3cyor/

                    Venkatesh VV Offline
                    Venkatesh VV Offline
                    Venkatesh V
                    wrote on last edited by
                    #23

                    @Ahti
                    Hi
                    Font size is varies from device to device based on their screen resolution. so that before going to give font size calculate with screens dpi and set the size.

                    1 Reply Last reply
                    1
                    • AhtiA Ahti

                      @jsulm after using gridlayout the text appears small why ? have a look:

                      https://postimg.org/image/axyj3cyor/

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

                      @Ahti If the font is too small then increase its size

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

                      1 Reply Last reply
                      2

                      • Login

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