If the API that you are using for polling events is blocking, then a thread is the only option. Otherwise you can install a even filter at either the QApplication or your top level widget and do you work whenever a paint event comes.
In case of QML, I dont remember the exact details but scenegraph renders emit frame start and frameend signals. A simple search on google should give you the exact api.
Just be aware if the poll method will take a long time thread approach will be better
↧