Ask Your Question

Revision history [back]


I am not an expert GUI programmer, but I think that this is not the best way to get what you want. You are hanging forever on the callback Dialog::on_showVIDEO_clicked() which probably will leave your GUI unresponsive.

IMHO, you should move the contents of that callback to a thread, remove the calls to cvNamedWindow(), cvShowImage() and cvDestroyWindow() and change the call to cvWaitKey(33) for a usleep(33). Then inside Dialog::on_showVIDEO_clicked(), start/stop the thread as needed.

It might seem like a lot of work, but I think it is the way to go.