Hi!. How can i close (or quit()) a thread from the calling process?. I'm trying to send a signal to the thread object to quit it but i dont know how, what kind of signal should i send? and how? any sugestion would help. Thanks!
Hi!. How can i close (or quit()) a thread from the calling process?. I'm trying to send a signal to the thread object to quit it but i dont know how, what kind of signal should i send? and how? any sugestion would help. Thanks!
Hi,
thing is qthread can't receive signals or events if it's not processing event loop.
see QThread::exec() and QCoreApplication::processEvents()
u may use any signal because even if signal has some parameters, you can connect it to slot that have no(and quit() haven't). You can also(more elegant way) provide own signal:
Qt Code:
class x:public Q... { Q_OBJECT ... signals: void stopThreadSignal(void); };To copy to clipboard, switch view to plain text mode
Last edited by mchara; 30th November 2007 at 06:41.
See GrEEn (Graphics Effects Environment)
http://sourceforge.net/project/platf...roup_id=232746
a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).
Bookmarks