Manage QML pages from c++
-
Hello everyone,
I'm starting a new Qt Quick application and I would like to control QML pages (items) from a class c++.
Let me explain, I would like to develop a model-view-controller application with the model and controller in c++ and only the view in QML.
But I don't know what's the best way to do it.In the past I used QWidget : I put all my QWidget pages in a QStackedLayout and I changed the current index to switch between pages. And I would like to reproduce this mechanism but with QML pages.
Have you done that before ?
Can you help me to design my application ?Thank you
-
Good. You can do all that. Just check SwipeView component.
-
Best way is to make it declarative. You can define currentIndex as Q_PROPERTY inside the QObject class and expose it.
-
I suggest you to close this issue and open another issue. So that it helps others who are looking for similar question.