Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QGridLayout cell height

    General and Desktop
    3
    3
    112
    Loading More Posts
    • 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
      pixbyte last edited by

      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.

      jsulm JoeCFD 2 Replies Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @pixbyte last edited by

        @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 Reply Quote 0
        • JoeCFD
          JoeCFD @pixbyte last edited by JoeCFD

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post