What do you need threads here for anyway?

By the way, I'd drop this code:
Qt Code:
  1. QEventLoop evLoop;
  2. for(;;)
  3. evLoop.processEvents(QEventLoop::ExcludeUserInputEvents);
To copy to clipboard, switch view to plain text mode 
and change it to:
Qt Code:
  1. app.exec();
To copy to clipboard, switch view to plain text mode