[Interest] running Qt main event loop in secondary thread

Stefan Seefeld stefan at seefeld.name
Tue Mar 28 15:16:52 CEST 2023


Thanks all for the quick follow-up !

It's good to hear that what I have in mind *should* work. However, I'm
actually struggling a bit with the implementation. I have attached a very
simple test-case creating a simple (pyqt5) app. If I call the `main()`
function rather than `run_app()` directly, the script fails: First I see
the error / warning message

  `WARNING: QApplication was not created in the main() thread.`

the main window appears, but isn't fully constructed and it doesn't look
like the event loop is ever started. (The window's content isn't updated,
no button appears, and the app isn't receiving input events.)
What am I doing wrong ?

Thanks,


      ...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230328/33a864c0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt-test.py
Type: text/x-python
Size: 736 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230328/33a864c0/attachment.py>


More information about the Interest mailing list