I settled for QWaitCondition with the idea of having my image buffer alert sleeping threads via waitCondition.wakeAll() and have the run() functions of the rendering and computing threads sleep when done with its current processing via waitCondition.wait(). I kept pointers to the waitCondition to allow the various threads access to it. However, I'm having this compile-time error in my computing thread: no matching function for call to 'QWaitCondition::wait()'.
Qt Code:
/window.h Private: QWaitCondition waitCondtion; QWaitCondition* pWaitCondition; ComputeThread* computeThread; //window.cpp Window::Window() { pWaitCondition = waitCondition; computeThread = new ComputeThread(pWaitCondition); } //computethread.h Private: QWaitCondition* newImage; //computethread.cpp { newImage = wc; } void ComputeThread::run() { newImage->wait(); //error goes hereTo copy to clipboard, switch view to plain text mode
what could be wrong? TIA.
Bookmarks