Dynamically change the layout
I would like to dynamically change the widget displayed in a part of a window. According to the situation, another widget should be displayed.
I have tried to remove the old widget from the layout and add the new one but it does not work.
I have tried to delete the old layout and create a new one but it does not solve the problem.
During these attempts, I have tried to repaint the window but it does not help.
How could I do? I just need to replace dynamically a widget with another one in a "box" of the layout.
Thanks!
Re: Dynamically change the layout
Take a look at QStackedLayout and QStackedWidget.
Re: Dynamically change the layout
Thank you!
This is exactly what I was looking for.
In the meantime, I had done it with QTabWidget but this is what I needed.
Thanks!