[Qt-interest] Delete QObjects which are moved to different thread

Wilhelm wilhelm.meier at fh-kl.de
Wed Oct 26 09:27:35 CEST 2011


Hi,

if I move a QObject to a different QThread and then destroy this object 
deferred, the dtor is called by this thread, if it is running: ok.

But if the other thread is not running, I can't use deferred deletion 
since there is no running event loop.
Trying to delete the object from the main thread via delete operator, 
the dtor ist called from a different thread than the main thread: I 
assume the QObject-dtor detects that the object belongs to a different 
thread and if that is not running it starts a new thread to execute the 
dtor. Right?

-- 
Wilhelm




More information about the Qt-interest-old mailing list