User7723337
User7723337

Reputation: 12018

Multi Screen/Window QT QML C++ application

I am new to QT Quick and QML and I am trying to build a Linux Desktop multi Window application using C++ and QT. I mean application having multiples windows like:

I want to have these screens as independent C++ classes and QML files for example:

I am able to build QML files representing these screens but not sure how to map them to a class which will control and communicate with QML and backend. I want to have each QML file represented as C++ Class. And screen stack manager will use these classes to push and pop screens from the screen stack.

I have seen the examples provided by QT but most of the examples are single screen and not explaining how to have multiple screens and how the screen stack is maintained.

Upvotes: 2

Views: 1955

Answers (1)

David K. Hess
David K. Hess

Reputation: 17246

Use the Quick Controls 2 StackView control:

https://doc.qt.io/qt-5/qml-qtquick-controls2-stackview.html

This control maintains a stack of QML views where the top one is always visible and you can pop and push views with animation.

Upvotes: 1

Related Questions