Hi, anda_skoa:
Thank you for your prompt reply... Yes. I am transport the image as a signal argument , and I'm using Qt::BlockingQueuedConnection.
If I use Qt:irectConnection, I always get the following error message, and nothing has been drawed on the MainWindow:
Now, I changed my signal/slot now, and avoid using the image as a signal argument. And, I'm trying to use Qt::QueuedConnection as suggested by you, it seems all signals emitted by my code are queued there forever, and nothing has ever been drawn on GUI... During debugging, whenever I paused the program, the debugging pointer will point to the line this->m_threadGroup.join_all(); . the code patch is attachedQPixmap: It is not safe to use pixmaps outside the GUI thread
void LVStream::start()
{
this->m_threadProducer = boost::thread(&LVStream:roducer, this);
this->m_threadConsumer = boost::thread(&LVStream::consumer, this);
this->m_threadGroup.add_thread(&this->m_threadProducer);
this->m_threadGroup.add_thread(&this->m_threadConsumer);
this->m_threadGroup.join_all();
}
Any further suggestions please?
Thank you very much.
Pei
Bookmarks