signal qt from a non-qt thread, QueuedConnection

前端 未结 2 904
灰色年华
灰色年华 2021-01-22 14:07

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),          


        
相关标签:
2条回答
  • 2021-01-22 14:41

    I would assume both threads need to be QThread with a QEventLoop to have that work.

    0 讨论(0)
  • 2021-01-22 14:55

    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.

    0 讨论(0)
提交回复
热议问题