[Qt-interest] QThread after finishing its job
Bob Hood
bhood2 at comcast.net
Fri Oct 30 21:48:38 CET 2009
Miguel Cardenas wrote:
> My doubt is: should I do delete the already finished QThread object?
> does it "die" and erases itself after it exits? I have an application
> with a button that launches a QThread, but don't know what to do after
> it exits by a normal "return;" call.. or do I have to use
> QThread::quit() or QThread::exit(0) ? by calling these functions the
> object and thread dies itself and does not require to be deleted?
Call deleteLater() on a completed thread. It will be consumed the next
time the even loop runs.
More information about the Qt-interest-old
mailing list