Can Anyone pls explain me the control flow in QT quick controls application.
Akshay Singh last edited by Akshay Singh
Just Started learning this topic.
Wants to get a clear view on what loads first??
Qml page or main() function of c++ file.
If c++ load first with control to main() function then, which class and function is used to tell the compiler or application to load qml pages?
(As in QWidget application.for example-> window.show() is used to start the Widget procedure.)
Eeli K last edited by
Qt program is always a C++ program and always starts with main(). QML works in a runtime engine written in C++. See a main() function of some example project:
QQmlApplicationEngine engine; engine.load(QUrl("qrc:/main.qml")); return app.exec();
The UI (the object structrure declared in main.qml etc.) is built in the loading phase and each component's Component.onCompleted is run. But not before app.exec() is called the signals/slot connections, state machines etc. start actually working and the user can interact with the QML Quick interface. I don't know when the UI painted.
Akshay Singh last edited by
Okay,,,,thanks ,that helped me a lot for learning the start.