PDA

View Full Version : How to change the distribution of the mainwindow at runtime.



sergio87
26th April 2011, 12:03
Hello!

I'm new in QT. I'm using eclipse CDT (programming in C++) and using the GUI project (.ui). First of all, I create a main window with two push buttons. I would like that when you click on one of two buttons change the entire contents of the window (and the buttons disappear). This new content will have an image and some push buttons, but that's another thing.

What's the best way to do that? I think that I could change the layout when the button is pressed. Perhaps I could use frames. ¿Any ideas? :confused:

Thanks in advance.
:D

ChrisW67
27th April 2011, 08:13
QStackedWidget perhaps

sergio87
27th April 2011, 08:51
QStackedWidget perhaps

I'm going to try it.

Thanks!! :D