Unsolved 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.
-
@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.