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. Why do UI elements resize different rates?
Forum Updated to NodeBB v4.3 + New Features

Why do UI elements resize different rates?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 473 Views 1 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.
  • T Offline
    T Offline
    thetruejoyofcode
    wrote on last edited by thetruejoyofcode
    #1

    When resizing the window, not all of the elements scale at the same rate

    Meaning if I resize the window to double its size, the UI should look like the same UI stretched but it doesn't not everything changes size at the same rate

    Even creating a simple test program with only text and a button in a vertical layout and they still scale at different speeds.

    B 1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      what do you mean different "speeds"? "rates"? Speeds infers redraw time. Comment about stretched infers inconsistent scaling behaviour.

      I light my way forward with the fires of all the bridges I've burned behind me.

      T 1 Reply Last reply
      1
      • Kent-DorfmanK Kent-Dorfman

        what do you mean different "speeds"? "rates"? Speeds infers redraw time. Comment about stretched infers inconsistent scaling behaviour.

        T Offline
        T Offline
        thetruejoyofcode
        wrote on last edited by
        #3

        @Kent-Dorfman I mean resizing of course, All the widgets don't change size proportionally.

        I would expect that stretching out the window and resizing would result in UI looking the same just stretched or enlarged, but that's not what happens and I'd really appreciate some info

        Kent-DorfmanK 1 Reply Last reply
        0
        • T thetruejoyofcode

          @Kent-Dorfman I mean resizing of course, All the widgets don't change size proportionally.

          I would expect that stretching out the window and resizing would result in UI looking the same just stretched or enlarged, but that's not what happens and I'd really appreciate some info

          Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by
          #4

          @thetruejoyofcode
          In that case it depends on the layout strategies of contained widgets and their size hints. Making a form scale correctly is a bit of an art.

          I light my way forward with the fires of all the bridges I've burned behind me.

          T 1 Reply Last reply
          1
          • Kent-DorfmanK Kent-Dorfman

            @thetruejoyofcode
            In that case it depends on the layout strategies of contained widgets and their size hints. Making a form scale correctly is a bit of an art.

            T Offline
            T Offline
            thetruejoyofcode
            wrote on last edited by
            #5

            @Kent-Dorfman okay, thank you!

            So there isn't an easy way to keep everything at the same proportions?

            ? 1 Reply Last reply
            0
            • T thetruejoyofcode

              @Kent-Dorfman okay, thank you!

              So there isn't an easy way to keep everything at the same proportions?

              ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

              @thetruejoyofcode everything depends on how you do size your components.

              For example, if you size an item to be 100x50px for example, it will always be 100x50px what ever the size of your window, this item will never be resized.

              If on the other hand you specify your item to be half the width and height of the parent window, it will always be resized to the half of the window.

              In fact it is strongly dependent on whether you size your item in an absolute or relative manner.

              1 Reply Last reply
              0
              • T thetruejoyofcode

                When resizing the window, not all of the elements scale at the same rate

                Meaning if I resize the window to double its size, the UI should look like the same UI stretched but it doesn't not everything changes size at the same rate

                Even creating a simple test program with only text and a button in a vertical layout and they still scale at different speeds.

                B Offline
                B Offline
                blackestmoon
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0

                • Login

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