Hi!,
I have a singlethreaded application which performs some longer task. The task is devided in to small portions and accomplished by Producer-Consumer, Qt::QueuedConnection, signal-slot loop. Everthing works well, gui is responsive.
I have a 'Stop' button in the gui. In its 'onClick' event handler i am displaying a confirmation message with use of QMessageBox::exec() function.
Unfortunately i am facing the following problem:
When the confirmation message is displayed, sometimes the Producer-Consumer loop is blocked and sometimes it proceeds unaffected.
I would like the modal confirmation box to block the execution of the Producer-Consumer loop.
I have read that exec() runs its own event loop and this would explain why Producer-Consumer loop proceeds. However, i am confused with the fact that sometimes it is blocked. And still.. i would like to block this loop somehow.
Any ideas?
best regards.
Bookmarks