PDA

View Full Version : How to develop an Application with multiple screens



screwgoth
18th August 2012, 20:55
Hi guys, I'm fairly new to Qt.
Most of the example applications I have seen have stuff happening inside one screen.
One of things I'm trying to learn is to write an Application that has multiple screens. For example, it could start with a Splash screen, then followed by the Home screen and few others.
I already figured out the Splash screen with QSplashscreen.
Also, I could use QStackedWidgets to display different "Pages" using this tutorial : http://www.developer.nokia.com/Community/Wiki/Archived:Create_a_page_based_UI_with_QStackedWidge t_and_QToolbar
Is there any other way to do this, lets say, for Game development ?

d_stranz
19th August 2012, 00:11
Not sure what you mean by "multiple screens".

Do you mean multiple, independently moveable windows that all sit on the desktop? Yes, you can do that. Any QWidget created without a parent is by default a top-level widget with an implicit parent being the desktop widget.

Do you mean multiple, independently moveable windows that all sit within an application frame that has menus and toolbars, etc? You can do that too, with QMainWindow having a QMdiArea as its central widget with QMdiSubWindow children.

Do you mean multiple windowns, only one of which is "on top"? You can do that with QTabWidget or QStackedWidget.

Note that the tutorial you referenced has been deprecated (but only because the trolls want you to do it with Qt Quick and QML instead of widgets in C++).


Is there any other way to do this, lets say, for Game development ?

There are as many ways to do anything as there are programmers. Some ways are better, some are worse.