I'm reading a file and using a progress bar.

Qt Code:
  1. while(!in.atEnd()){
  2. //work
  3. ui->progressBar->setValue(in.pos());
  4. qApp->processEvents(QEventLoop::ExcludeUserInputEvents); // "disables" gui
  5. }
To copy to clipboard, switch view to plain text mode 

During this event, there is the possibility that a signal is emitted, the issue is that I can't detect it because of the QEventLoop.