[Qt-interest] QThread deletion

Patric userqt at gmail.com
Mon Jun 8 19:13:24 CEST 2009


He means another event loop, except this in the main thread.
It's not necessary to have event loop in your thread. But if you have to use 
signals & slots, or the network module , QTimer or any event-driven object - 
you should.

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