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

QGridLayout cell height

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

    My UI has some QGridLayouts. Two of them contain 3 Rows and they looks the same. The third one contain just 2 Rows.
    How I can make the Rows the same height as the Rows in the 3 Row QGridLayout? I tried with SpaceItem but with this the two rows are squezzed together.
    If I do not use the Spacer the row height is not much.
    I have the feeling that the QGridLyout does not know the actual dimensions at this creation time.

    jsulmJ JoeCFDJ 2 Replies Last reply
    0
    • P pixbyte

      My UI has some QGridLayouts. Two of them contain 3 Rows and they looks the same. The third one contain just 2 Rows.
      How I can make the Rows the same height as the Rows in the 3 Row QGridLayout? I tried with SpaceItem but with this the two rows are squezzed together.
      If I do not use the Spacer the row height is not much.
      I have the feeling that the QGridLyout does not know the actual dimensions at this creation time.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @pixbyte said in QGridLayout cell height:

      QGridLyout does not know the actual dimensions at this creation time

      What do you mean exactly?
      The height of a cell is determined by the content of the cells in the row. What do you have in all these layouts?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P pixbyte

        My UI has some QGridLayouts. Two of them contain 3 Rows and they looks the same. The third one contain just 2 Rows.
        How I can make the Rows the same height as the Rows in the 3 Row QGridLayout? I tried with SpaceItem but with this the two rows are squezzed together.
        If I do not use the Spacer the row height is not much.
        I have the feeling that the QGridLyout does not know the actual dimensions at this creation time.

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #3

        @pixbyte you are right. Use sizeHint to set it. The widgets allocate actual sizes in resize event.

        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