Hi,
I had a code in Qt-3.2. its like this,
QWaitCondition m_CaptureFinished;
if (running()) {
qDebug("Waiting for capture thread to stop...");
m_StopCapture = true;
m_CaptureFinished.wait();
qDebug("Capture thread stopped.");
}
and this section is working in Qt-3.2. But When I try this code then it display an error like this
error: no matching function for call to ‘QWaitCondition::wait()’
/usr/local/Trolltech/Qt-4.3.0/include/QtCore/qwaitcondition.h:44: note: candidates are: bool QWaitCondition::wait(QMutex*, long unsigned int)
Then I try like this
if (isRunning()) {
m_BufMutex.lock();
qDebug("Waiting for capture thread to stop...");
m_StopCapture = true;
m_CaptureFinished.wait(&m_BufMutex);
qDebug("Capture thread stopped.");
}
Then doesn't display any error when I make the program. But at run time the program is crashed due to the thread is not stoped. How can I solve this ploblem.
Please help me.....
Bookmarks