Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Flags Windows 7 window always on top INCLUDING the Win7 taskbar (Custom error)



  • I know a few flags that make the window always on top (eg Qt :: ToolTip, Qt :: WindowStaysOnTopHint, Qt :: Popup), but each time the method is the same problem.

    By clicking on the start menu, the area tray, empty field between programs and tray - window and so is hiding.

    Everything is fine when I switch between different applications and I click anywhere except the above-mentioned places.

    Just run other applications that I used to use, so it might be a function of the uninvited Windows.

    Code does not make sense given, because at the same time where do dumb mistake, and indeed act as a flag to be apart of this "small" problem.



  • At a forum got the answer that WinApi this effect can be achieved by:
    SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);

    Now the question is how to move to QT?



  • These things work:
    HWND hWnd = reinterpret_cast<HWND>(this->winId());
    SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);

    But it turns out that exactly the same as the flag of the subject. : (

    Explanation of what exactly is the problem:
    http://youtu.be/k5TCtr1hPKY



  • The solution is, regular exercise such thing:
    @ if(this->isActiveWindow() == false} {
    this->raise();
    }@

    Only the minimized window does not always work, but to me it is unnecessary.


Log in to reply