So I'm working on a QT5 based GUI and I have a main window that fills in an empty area depending on user input. The gui looks roughly like this
---------------------
|Qlabel 1 |Qlabel 2 |
|-------------------|
| |B1|
| MAIN |B2|
| |B3|
|-------------------|
B1,B2, and B3 are buttons which create popups that ask for user input. Main is the issue. In QT Creator I've set main to be a widget. I've also created a widget which has a layout (again in QT creator) which I'll call filler. On input an instance of filler, I add filler to a layout which I then set on main. The issue I'm having is that sizing seems to be totally dependent on the QT creator sizing of the layout inside of filler.
What I want is for filler to scale to the size of the encapsulating MAIN widget and I'm not sure how to go about this. Any input is helpful!
Edit:
The code which fills in main is roughly
fillerWidget* filler = new fillerWidget(ui->mainWidget, QString::fromStdString(input1), input2);
QGridLayout* fillerLayout = new QGridLayout();
fillerLayout->addWidget(filler, 0, 0);
ui->mainWidget->setLayout(fillerLayout);
ui->mainWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
filler->adjustSize();