try adding
Qt Code:
  1. QApplication::setQuitOnLastWindowClosed(false);
To copy to clipboard, switch view to plain text mode 
in main.cpp.