Reputation: 11661
I currently have about 4 Widgets in my form and I wanted to know if there was a way to minimize widgets on a form and then restore them again once needed. One way that I am familiar with is to use a frame and place the widgets on a frame and then hide the frame whenever the need arises. Is there a better or another approach ??
Upvotes: 0
Views: 37
Reputation: 25413
Here is a snippet to hide every widget.
foreach (QWidget* widget, QApplication::topLevelWidgets()) {
widget->hide();
}
Since you have the widget object, you can do whatever you want, with this widget.
Upvotes: 2