So your complaint is that when your main program opens the secondary windows they automatically activate and take focus from the main window. Try:
Qt Code:
  1. setAttribute(Qt::WA_ShowWithoutActivating);
To copy to clipboard, switch view to plain text mode 
in the secondary window constructor.