[Qt-interest] Qt Signal slot mechanism with QThread
raJkumar subbarayan
yesraaj at gmail.com
Tue Jan 19 19:25:40 CET 2010
Hi All,
I read about QThread behavior along with signal slot mechanism from
http://doc.trolltech.com/4.6/threads-qobject.html#signals-and-slots-across-threads
and
few more places.
I have couple of questions regarding the article.
1)Is it always good to specify whether the connection is Direct
Connection<http://doc.trolltech.com/4.6/qt.html#ConnectionType-enum>
or Queued Connection<http://doc.trolltech.com/4.6/qt.html#ConnectionType-enum>
in QObject::connect
function?
In case of direct connection the slot is
called immediately after emit is encountered.
But in case signal emitted thread and object whose slot is called is in
different thread leads to immediately putting the slot's thread to wait
and execution of slot in it's thread happens, make sure the slot is
reentrant in this case.
2)I find difficulties understanding how Qt selects one of above connection
in case the parameter is left blank, can any one explain ?
Thanks
Raj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100119/b5b9dcd4/attachment.html
More information about the Qt-interest-old
mailing list