Important: Please read the Qt Code of Conduct -

Mouse Over changing focus

  • I have a main window that has an open modal dialogue which has in turn opened a second modal dialogue.

    If I move the mouse over the main window it grabs focus and the 2nd. dialogue is thus completely obscured.

    The parent of the first dialogue is a QWinWidget whose parent is a child of the main window and the parent of the 2nd. dialogue is the 1st dialogue.

    What do I need to do to stop this annoying behaviour?

    Thanks, David

  • Lifetime Qt Champion

    QWinWidget ? so this is Qt4.8 ?
    And what platform do you run the app on ?

    Could be a bug in QWinWidget as it sounds very strange that the main window should grab focus just by mouse
    hovering unless you have code take the focus on hover event.

  • Qt level is 5.12.8 not 4.8. Platform is Window 10.

    I've certainly got no code to handle focus like that. The source of QWinWidget does appear to mess with focus.


Log in to reply