I’m making a game in Qt.
The game itself is displayed by QGraphicsView/QDockWidget in a QMainWindow.
But now i’m trying to make a menu for it, so I thought to make an extra QMainWindow with QPushButtons. But I want this all to be integrated in one QMainWindow.
So when I click “New Game” in the menu, the game(QGraphicsView/QDockWidget) is immediately (and in the same window) displayed, without first shutting down the menu-window and then showing the game-window.
It would be easier to have just one QMainWindow with the game and the menu as QWidgets, but this is impossible because i’m using QDockWidgets, so I have to make a seperate QMainWindow to display the game.
Any solutions?
Best regards
You could switch to QML (Qt Declarative) where it would be easy to use a state with menus shown and another one for displaying the game without menus.