Too much space between rows in QGroupbox
-
Hey guys,
I have got a simple QGroupbox with two rows and one column into a QGridboxlayout. As you can see it in the link below, there is too much space between the rows.
http://i.imgur.com/UCtW9Vl.png
I don't know how to solve it. I already did couple of settings:
layout->setVerticalSpacing(1);
layout->setRowStretch(0,1);
layout->setRowStretch(1,1);
layout->setContentsMargins(1,1,1,1);
I thought if i set VerticalSpacing to 1 its working but there is still to much space. Did I forget something?
-
@Joe-Macaroni I don't understand very well. How do you set rows and columns in a QGroupBox?
-
Oh sry, I did it like this:
box = new QGroupBox(this); boxLayout = new QGridLayout(this); box->setLayout(boxLayout); boxLayout->addWidget(label1,0,0); boxLayout->addWidget(label2,1,0);
-
Hi and welcome to devnet,
Why not use a QVBoxLayout with a stretch at the last position ?
-
I mean't: call the addStretch method form QXXXLayout