I have 2 windows open. I want to programmiticaly make one window be on top and have focus from the other window. I'm calling
Qt Code:
  1. window->setWindowState(Qt::WindowActive);
  2. window->setFocus();
To copy to clipboard, switch view to plain text mode 
but the window I'm calling it from stays in focus. Am I doing something wrong? They are both a QMainWindow