[Qt-interest] global thread not running until main app starts

Paul England pengland at cmt-asia.com
Wed Jan 14 02:42:12 CET 2009


Interesting, thanks.

How exactly would main() look in that case?  What would it return 
instead of app.exec() ?
I was thinking conversely, I could repaint the widget in question (that 
uses data from the threads) once the QDialog constructor exists, but I'm 
not finding a signal that's emitted in such a case.

Thanks
Paul

Andrew Medico wrote:
> You probably should exec() QApplication before starting your QThreads,
> so that Qt can set up its internal workings (event loop, etc). The
> documentation at http://doc.trolltech.com/4.4/threads.html states "you
> must create the QApplication (or QCoreApplication) object before you
> can create a QThread."
>
>   



More information about the Qt-interest-old mailing list