Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.1
-
None
-
Windows (10)
-
c5b7a3c922ef7dcd7d3c670ea1dd318e27d53d51
Description
Running the following code on Windows has 'c' (the first window being shown) end up as a 'normal' window (and not a top-most window, like you would expect).
#include <QApplication> #include <QWindow> #include <QTimer> #include <QDebug> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWindow b; QWindow c; b.setFlag(Qt::WindowStaysOnTopHint); c.setFlag(Qt::WindowStaysOnTopHint); b.setPosition(1200,700); c.setPosition(1280,720); c.show(); // <- is not a topmost window b.show(); // <- is a topmost window return a.exec(); }
I played around a bit and the changes made in the following patch fixes the issue. Although I don't know if it will break other things (dialogs, prompts, etc). But at least it can serve as inspiration.
https://codereview.qt-project.org/207498