GridLayout with equal sized cells

  • Hi all,

    is there a way to force a GridLayout to keep the cells equally sized so I can use it as a real layout grid?

    GridLayout {
      width: 100
      height: 100
      columns: 5
      rows: 5
      columnSpacing: 0
      rowSpacing: 0
      Rectangle {
        Layout.fillWidth: true
        Layout.fillHeight: true
        Layout.column: 2
        Layout.row: 1

    The rectangle in the example should sit at x = 40 and y = 20 and the size should be 20x20.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.