I am emitting a signal from a worker thread and connecting it to a slot in GUI thread of MainWindow.
In the slot I am invoking a QMessageBox and displaying some error message.
Now I want the worker thread to stop working until I click OK on the QMessageBox.
Here is how I am doing it:

//worker thread
Qt Code:
  1. emit CameraDisconnectSignal("no camera present");
To copy to clipboard, switch view to plain text mode 
//GUI thread
Qt Code:
  1. void MainWindow::CameraDisconnectSlot(QString q)
  2. {
  3. QMessageBox messageBox;
  4. messageBox.critical(0,"Error",q);
  5. messageBox.setFixedSize(500,200);
  6. }
To copy to clipboard, switch view to plain text mode 

First of all I am not able to get any MessageBox and secondly I want to stop worker thread till the user clicks OK on GUI thread.
How can I acheive this??