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. Problem with alignment of elements within a QGridLayout
Qt 6.11 is out! See what's new in the release blog

Problem with alignment of elements within a QGridLayout

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 198 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.
  • qwasder85Q Offline
    qwasder85Q Offline
    qwasder85
    wrote on last edited by qwasder85
    #1

    Please have a look at the picture showing my QGridLayout below. Blue are widgets, magenta shows my grid layout. The two green "buttons" are in a QHBoxLayout within a QFrame.
    I want those two buttons to align right within that first column without them stretching that column.

    Using insertStretch(0) on the QHBoxLayout or setting the buttons to Qt::AlignRight both stretches the column.
    I feel like this can be solved with a correct QSizePolizy, but I can't find a working combination.

    (The "^ Stretch v"-text has nothing to do with the issue btw.)

    alt text

    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