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. Tool Windows don’t stay on top of main Window after upgrading from QT 5.8 to QT 5.12.3
Forum Updated to NodeBB v4.3 + New Features

Tool Windows don’t stay on top of main Window after upgrading from QT 5.8 to QT 5.12.3

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 363 Views 2 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.
  • J Offline
    J Offline
    J.Andre
    wrote on last edited by
    #1

    Hi,
    I’m experiencing an issue on Windows after upgrading to QT 5.12.3
    I have a set of tool windows that I create and assign a native window as their parent using setTransientParent(). These windows previously would always stay on top of the native window, but now they go behind the parent window just as soon as I mouse over the parent window.
    I’ve used Spy++ to inspect the native Win32 properties and it says that the tool windows do not have a parent assigned to them. The same tool windows in the old QT version, however, do have a parent.

    More details:

    • We’re setting this flags on the tool windows: Qt::Tool | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint
    • We’re setting these attributes: Qt::WA_NativeWindow and Qt::WA_NoSystemBackground

    Here's the code that sets the parent:

    HWND hMainWin = TpQtWin::mainWindow();
    QWindow* qMainWin = QWindow::fromWinId((WId)hMainWin);
    
    toolWindowWidget->setAttribute(Qt::WA_NativeWindow);
    
    QWindow* toolWindow = toolWindowWidget->windowHandle();
    toolWindow->setTransientParent(qMainWin);
    

    Has something changed in the more recent QT versions and I need to be doing something new?

    Any ideas on where to investigate or things to try?

    Thank you.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      There might have a lot of things that could have changed in between. Did you also check with a more current version ? Thinking about the latest 5.12 but also 5.14.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        There might have a lot of things that could have changed in between. Did you also check with a more current version ? Thinking about the latest 5.12 but also 5.14.

        J Offline
        J Offline
        J.Andre
        wrote on last edited by
        #3

        Hi @SGaist
        Unfortunately, we're in a situation where we have to use QT 5.12.3 as we've taken a dependence on a component that requires that specific version.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I currently really meant just to check whether the situation is better with a newer version. If so, you might be able to backport the patch.

          Qt 5.12.3 exactly ? That's pretty surprising since Qt is both forward and backward compatible.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

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