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. Question to QGridLayout
Forum Updated to NodeBB v4.3 + New Features

Question to QGridLayout

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 277 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.
  • D Offline
    D Offline
    django.Reinhard
    wrote on last edited by
    #1

    Hi,

    In my dockable I use gridlayout which looks like this:

    gridlayout with gap
    All column widgets are QLabel.
    Labels from second and fourth column have horizontal size policy of "MinimumExpanding".
    GridLayout is configured with layoutColumnStretch of 0,1,0,1,0
    Labels of first column have maximum width, so I guess, layout column 0 is wider than contained widgets.

    I tried to change layoutColumnStretch to 0,50,10,50,0 - but it makes no difference.

    How can I close the gap between first and second column?
    Doesn't look nice actually.

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      I saw only 4 columns in your pic. Why do you have 5 settings for stretch?
      Try to layoutColumnStretch to 0,50,10,80 to reduce the gap between first and second column.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        django.Reinhard
        wrote on last edited by
        #3

        Yes, I have only 4 columns, but - for whatever reason - qtcreator wants 5 column stretch values. When I remove one, it adds it again.

        Beside that, you suggestion does not do the trick. It just increases the right column and I don't want that column be stretched.

        The best would be, if gridlayout would get rid of the maximum width of the first column. Maybe I'd have to write my own layout.

        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