There is a layer with two buttons. Everything is created programmatically:
ui->setupUi(this); layout = new QVBoxLayout(this); setLayout(layout); for (int i(0); i < (list.size() + 1); i++){ QPushButton *button = new QPushButton(this); layout->addWidget(button); } lGeometry.setRect(281, 314, 650, 460);/ layout->setObjectName("mainLayot"); layout->setGeometry(lGeometry); qDebug() << layout->geometry(); When you start the program, the layer still opens to the entire widget, and qDebug() :
QRect (0.0 824x557)
Tried to use the layout->setSizeConstraint(QLayout::SetFixedSize); but then everything is minimized to both the main widget and the layer and buttons. Tell me how to be?