Reputation: 869
I have this main window on which I would like to put 2 widgets on the same space, i.e. when the user clicks a button then one of the widgets should come up front and the other be hidden and then change places when clicking another button.
My Widget are of different types: one is a QGLWidget and the other one is a QGraphicsView.
How could I put these 2 widgets on the same place?
Upvotes: 0
Views: 119
Reputation: 6829
Use QStackedWidget. Qt Doc says that :
The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.
Upvotes: 1