empty space in QGridLayout
Hi:
Code:
/* layouts */
sessionLayout->addWidget(hostLabel, 0, 0);
sessionLayout->addWidget(hostText, 0, 1);
sessionLayout->addWidget(portLabel, 1, 0);
sessionLayout->addWidget(portText, 1, 1);
sessionLayout->addWidget(connectButton, 2, 0);
sessionLayout->addWidget(closeButton, 2, 1);
What I want to do is this:
- I have 4 rows and 3 columns
- I need 5 rows and 4 columns where the last line + column consist of empty spaces (as big as other rows/columns)
- the problem is I don't know how to do it with QSpaceItem...I added it to sessionLayout with QGridLayout::addItem() but the problem is the size...
so any other idea how to do this efficiently?
Re: empty space in QGridLayout
How about you create 2 QSpacerItems with different policies for row and for column and use addLayoutItem method?