Yes, I've tried raise(), and setFocus for the widget, etc - nothing changed, focus stays on the secondary window until I click on the main window.
Now I have found a bad solution:
Qt Code:
  1. img_viewer->window.show();
  2. hide();
  3. show();
To copy to clipboard, switch view to plain text mode 
After that, the focus moves to the main window. But I want to move the focus without any window disappearing