Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML and threads



  • Is it possible to have the Qml engine running in its own thread that wouldn’t be the main thread? Is it possible to have objects in the QML context that don’t belong to the same QML thread?

    I’m designing a tool that should operate in the backend and interact with the front end. https://testmyspeed.onl/ https://solitaire.cam/ https://essaywriter.fun/ I have a collection of QObject derivatives that are supposed to make calculations in a different thread and expose properties in QML. At the moment I cannot figure out the right way to do that. Help appreciated.


  • Qt Champions 2019

    @AlexanderMason said in QML and threads:

    I have a collection of QObject derivatives that are supposed to make calculations in a different thread and expose properties in QML

    And why don't you move these calculations to another thread instead of moving QML parts of your app to a different thread? You can then emit signals from that other thread when UI needs to be updated, but the UI is then changed in the UI thread, just like it should be.


Log in to reply