I have the following layout:
<vl>
<hl>
<otherstuff/>
</hl>
<hl2>
<tabwidget/>
</hl2>
<vl>
<vl>
<hl>
<otherstuff/>
</hl>
<hl2>
<tabwidget/>
</hl2>
<vl>
To copy to clipboard, switch view to plain text mode
"Other stuff" includes a toggle button. If this button is toggled, i'd like to hide <tabwidget> or the entire <hl2> layout.
I cant seem to find a way to hide an entire layout, so i called setVisible() on the tabwidget:
ui.tabWidget->setVisible(ui.btnTog->isChecked());
this->updateGeometry();
this->update();
ui.horizontalLayout_5->update();
ui.tabWidget->setVisible(ui.btnTog->isChecked());
this->updateGeometry();
this->update();
ui.horizontalLayout_5->update();
To copy to clipboard, switch view to plain text mode
As you can see i called all update/refresh related methods afterwards, but the dialog layout doesnt change.
That means there's a big, empty unused spot where the tabwidget used to be.
What do i have to do to force the widget to recalculate its layout and consider the now hidden tabwidget?
Bookmarks