signal qt from a non-qt thread, QueuedConnection
I am signaling my Qt GUI thread from a boost::thread, and I am using a Qt::QueuedConnection,
connect(src, SIGNAL(signal-signature), dest, SLOT(slot-signature), Qt::QueuedConnection);
and still, when I emit the signal my slot does not get called.
edit: I found the problem, it seems that I was connecting the signal later then my call, but I was sure of the oth开发者_开发百科erwise since breakpoints stopped first on the GUI thread at the connect call and then on the dispatch thread that does the emit
ty everybody for the help and ideas :D
Check whether the slot name and signal name are correct. Usually, if there is a problem (incorrect name), this is signaled in the console (an error message). Also, you could check the result of the connect function call. It should return false in case of connection unsuccessful.
I would assume both threads need to be QThread with a QEventLoop to have that work.
精彩评论