Important: Please read the Qt Code of Conduct -

[SOLVED] How to make Qt QMainWindow to be in focus and overlay when clicked with the mouse when there is window overlay

  • i have Qmainwindow that opens with show() method another QMainWindow the problem is that when the second QMainwindow is on top the first one , when i click with the mouse on the first QMainWindow it doesn't return to be on top of the second windows. its getting the focus but doesn't go on top .. so its looks funny and not natural windowing behavior.

    im using 2 QMainWindows . i know its not standard but i need the toolbar+ status bar of the window via the Designer.
    any way in the 2 QMainWindows i don't have any properties set , i suspect this is where the solution . the code is simple in the main window i have member of another QMainWindow and in the main window i just do :

    ListWindow* m_pListWindow; // the second qmainwindow
    void MainWindow::actionViewlistHandler()



  • ok i found it , the answer is to make the other window to be without parent

  • Please, mark your thread as SOLVED in the name of thread.

Log in to reply