[Interest] running Qt main event loop in secondary thread
stefan at seefeld.name
Tue Mar 28 22:23:58 CEST 2023
if you have a look at the little sample script I attached to my mail you'll
see that I'm actually constructing the application object within the
function that is executed in the other thread.
I do however import PyQt5 modules at the top of my script, and if I move
those imports into the function the warning goes away.
Does this suggest that PyQt5 itself instantiates a QApplication as a global
On Tue, Mar 28, 2023 at 4:16 PM Thiago Macieira <thiago.macieira at intel.com>
> On Tuesday, 28 March 2023 06:16:52 PDT Stefan Seefeld wrote:
> > 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 ?
> You must create the QCoreApplication (including QApplication) in the
> that the first QObject is created in. That warning message tells you that
> Thiago Macieira - thiago.macieira (AT) intel.com
> Cloud Software Architect - Intel DCAI Cloud Engineering
> Interest mailing list
> Interest at qt-project.org
...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest