The layout allocates the available space between the widgets that want it. If you place nothing in rows 1-5 of the grid then there is nothing to occupy space there, so the two actual widgets get the space. You have a range of options: set a maximum height on the custom widget, setRowStretch() to 1 for all rows except the last which gets 0, put (expanding) vertical spacers in the empty grid rows. What effect are you trying to achieve with the empty grid squares?




Reply With Quote

Bookmarks