[Qt-interest] QThread deletion

Patric userqt at gmail.com
Mon Jun 8 20:38:54 CEST 2009


Little correction :
I think you can send signals from one thread to another, even if you don't 
have event loop running on the first thread. But if you want to use the 
slots on that thread, you must have an event loop.

Patric


----- Original Message ----- 
From: "Jonathan Wong" <jhannwong at gmail.com>
To: <qt-interest at trolltech.com>
Sent: Monday, June 08, 2009 7:22 PM
Subject: Re: [Qt-interest] QThread deletion


>> It depends, if you started another eventloop in the thread you will
>> have to call quit() before wait(), otherwise the thread will never
>> finish.
>
> Don't I have to do an exec() in QThread's run() to enter an event loop? I 
> thought the thread will
> simply end if there's no exec() in the run().
>
> Or you mean "another event loop" besides the main one in the main 
> QApplication thread?
>
> OP says his thread has an event loop in it.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 




More information about the Qt-interest-old mailing list