GUI objects in threads aside, the original error message:
QMessageBox::critical' : none of the 4 overloads could convert all the argument
is caused by:
Qt Code:
  1. QMessageBox::critical(this,tr("ERROR"),tr("Large change in illumination.\nPlease re-capture reference image.\n"));
To copy to clipboard, switch view to plain text mode 
because the first argument, this, is not a pointer to a QWidget and cannot be converted to one.