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. How to scale columns evenly?
Forum Updated to NodeBB v4.3 + New Features

How to scale columns evenly?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 71 Views 2 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.
  • N Offline
    N Offline
    Nmatan
    wrote last edited by
    #1

    Hi all,
    I'm not sure how to achieve this exactly.
    I'm using QT Designer - how can I make the columns layout more evenly?
    Right now it looks weird with the last column taking up the majority of space.
    I tried going through the property editor, only setting I found that does something is "horizontalHeaderStretchLastSection" but that just stretches the last column.
    I want them more evenly laid out - is there some setting for this?
    d03ecae5-7016-4786-8b4d-0ad42b243f0f-image.png

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by
      #2

      You have to do it by yourself.

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

      N 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        You have to do it by yourself.

        N Offline
        N Offline
        Nmatan
        wrote last edited by
        #3

        @Christian-Ehrlicher Could you clarify please? Not sure what you mean there.
        Do it myself where?

        Pl45m4P 1 Reply Last reply
        0
        • N Nmatan

          @Christian-Ehrlicher Could you clarify please? Not sure what you mean there.
          Do it myself where?

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote last edited by
          #4

          @Nmatan

          Doing it yourself by writing code :)'

          Because you need a dynamic approach as the widget might change its size, so all the cols would need to match that as well.


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

          ~E. W. Dijkstra

          N 1 Reply Last reply
          0
          • Pl45m4P Pl45m4

            @Nmatan

            Doing it yourself by writing code :)'

            Because you need a dynamic approach as the widget might change its size, so all the cols would need to match that as well.

            N Offline
            N Offline
            Nmatan
            wrote last edited by
            #5

            @Pl45m4 but is there no method to at least have an 'initial' size for the columns, for example for previewing the UI?

            Pl45m4P 1 Reply Last reply
            0
            • N Nmatan

              @Pl45m4 but is there no method to at least have an 'initial' size for the columns, for example for previewing the UI?

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote last edited by
              #6

              @Nmatan said in How to scale columns evenly?:

              but is there no method to at least have an 'initial' size for the columns

              See

              • https://doc.qt.io/qt-6/qheaderview.html#ResizeMode-enum

              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
              2

              • Login

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