Priority: P3: Somewhat important
Affects Version/s: 5.4.0
Fix Version/s: 5.10.1
Component/s: QPA: Windows
Environment:Windows 7 Professional 64-bit.
Commits:329a029c361bcbaf70f3aa919693f0bef48a152f (qtbase/5.9, 16.5.2017, 5.9.1)
Attempting to set Qt::WindowStaysOnTopHint seldom works on Windows these days.
We recently upgraded to Qt 5.4 (from Qt 4.7) and every widget or dialog that uses this flag rarely has the underlying window style set. (I.e., they're never 'on top'.)
Very occasionally it works as advertised, but most of the time the widget in question will either be opened beneath other windows, or other windows can be moved/opened over it.
We have two main ways of setting this flag:
1) Calling setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint) from the constructor of a QWidget derived object.
2) Passing Qt::WindowStaysOnTopHint (along with other flags) as the second parameter to the QDialog constructor.
Neither seem to work particularly well.
Our products are built for both Linux and Windows. The Linux versions are working fine. (At least nobody has complained about them since we upgraded, and they appear to be working fine.)