PDA

View Full Version : QGridLayout - Stop stretching



johnnyturbo3
9th May 2011, 11:13
I have a couple of tabs that contain a QGridLayout with some widgets. One of the tabs is a little bigger than the other tabs in QTabWidget (more QLineEdits and labels). This causes the rows and columns on the other tabs to stretch.
6389
6388

I don't want the layout to stretch like this i.e. fixed spacing. I've tried setting some of the QGridLayout properties in order to stop the layout from stretching but none have them have worked.

Setting the max size of the tab does stop the QGridLayout from stretching, but I was wondering if there's another way to do this as the results are a little ugly?

Thanks

wladek
9th May 2011, 12:20
Did you try to add some Spacers? QSpacerItem

Wladek.