Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] How to make Qt QMainWindow to be in focus and overlay when clicked with the mouse when there is window overlay
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    umen242
    wrote on last edited by
    #1

    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()
    {

    m_pListWindow->show();
    

    }
    @

    1 Reply Last reply
    0
    • U Offline
      U Offline
      umen242
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Anticross
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved