Congratulations to our 2022 Qt Champions!

Can Anyone pls explain me the control flow in QT quick controls application.

  • 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-> is used to start the Widget procedure.)

  • 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;
    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.

  • Okay,,,,thanks ,that helped me a lot for learning the start.

Log in to reply