Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Keeping a window on top
In my app, my main.qml file instantiates the Loader. I set my startup page as the source. I then attempt to initiate a socket connection. I've defined a modal window to inform the user of any problems making the connection. The problem is, if the connection fails and the dialog box pops up before the startup screen is rendered, it is quickly pushed behind the startup screen.
Is there a way to force a window to always be on top? I would have thought setting the window to Qt.ApplicationModal would have done it, but that's not the case.
Have you tried:
Yes, that doesn't seem to work either. I see the dialog briefly, and then the startup screen blocks it out. Because the dialog is application modal, I cannot interact with the startup screen at all, even though I can't see the dialog.
I've solved the problem. The issue appears to be one of association. Most our pages are not actual Qt Window objects, but rather rectangle objects with various other controls and objects within them. The dialog I was attempting to create is a QML Window object. Without an association to the main application window, there was nothing to tell the QML engine how to handle the dialog in context of the main window. It then became simply a question of timing.
Thanks for sharing the solution.