PDA

View Full Version : Qt Window navigation



jbarrena
27th March 2014, 14:42
Hi there!

I am a relatively newbie in Qt, and I am developing a small application that has 5 screens. We can navigate back and forth within the screens. We have first the main window and then some screens that we can reach pushing some buttons.

MainWindow <-------> Window 1 <----------> Window 4
|
|<---> Window 2 <----------> Window 5
|
|<---> Window 3

How can I implement this?? A "parent" MainWindow and some "child" Dialogs perhaps?? Is there any example implementing a navigation between some windows??

Thanks and kind regards!

stampede
27th March 2014, 16:47
Try QStackedWidget (http://qt-project.org/doc/qt-4.8/qstackedwidget.html)

jbarrena
28th March 2014, 07:56
Try QStackedWidget (http://qt-project.org/doc/qt-4.8/qstackedwidget.html)

Thanks for the early response stampede.

One question about the QStackedWidget, are the added widgets active in memory?? I mean, if I have a widget that has some timers and slots inside, are they executing from the moment that are added to the stacked widget??

Thakns again!

anda_skoa
30th March 2014, 11:56
One question about the QStackedWidget, are the added widgets active in memory??

Yes, all widgets that have been created and have not been destroyed yet are "alive".

Cheers,
_