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

QGridLayout row positioning

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 212 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.
  • M Offline
    M Offline
    MAX001
    wrote on last edited by MAX001
    #1

    How can I place a row with buttons as high as possible at the top and take all the remaining space with a QWidget with a QGridLayout to display the opened image and the resulting image after defining the objects on it? So that the top row is always fixed at the top, regardless of the size of the window. I added setFixedHeight but the row is still not at the top and can I somehow avoid setFixedHeight for adaptability?

    There was an idea to apply the stretch property but I don't know how to add it to each row and will it work as I wanted?
    This is the result on the open window:
    86735b38-a622-40d5-8dc0-523f383735a0-image.png
    Wanna such result without top spacing
    5dd141e8-f5ec-41f6-b935-ef6d8d358f99-image.png

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MAX001
      wrote on last edited by
      #2

      Seems like done. Helped stretch property.
      PS grid.setRowStretch(0, 0) 0 row stretch 0
      grid.setRowStretch(1, 6) 1 row stretch 6
      a1cb1544-4e4f-4d42-9b0f-aca374e5bd26-image.png

      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