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.)