Hi again, It looks like the problem is that pyqt5 creates some hidden Qt objects very early (i.e. upon importing some modules). If I move the imports as well as the `MainWindow` definition into the secondary thread, everything appears to be working fine.
On Tue, Mar 28, 2023 at 9:16 AM Stefan Seefeld <ste...@seefeld.name> wrote: > 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... > > -- ...ich hab' noch einen Koffer in Berlin...
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest