Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Keeping child windows ontop on Linux (ubuntu/xubuntu/rhel)
StephenSmith25 last edited by
I am developer working on a cross-platform data analysis software package. We are currently having issues generating consistent window behaviour across each platform. Specifically, we have a single mainwindow (QMainWindow) instance (the main application window) and several child windows (QWidgets) which we'd like to stay on-top of this main window. For each child window, we'd like the following behaviour to be satisfied:
(1) Keep the child window on-top of the parent mainwindow
(2) Preserve the minimize and maximise button
(3) Lower the window when a new window (outside of the application) is placed on-top
To achieve this on Windows we utilise a parent-child relation. On Linux and OSX we also utilise this relationship, as well as setting the Qt.Tool flag for each child window. However, on Linux, by setting this Qt.Tool flag we lose the ability to minimize the window and therefore we've been investigating alternatives. Recently, we've been looking at the Qt.WindowStaysOnTopHint, which satisfies requirements (1) and (2) - however, the window remains on-top of everything (including other applications), which fails requirements 3.
At the moment, we feel like we've exhausted every possible solution and we are at a loss with it. My question is can we achieve all three of these behaviours on our Linux platforms?
Qt version 5.11.3
Thank you in advance,
tonytony last edited by
I run into the same issue as this one. @StephenSmith25 Do we already have a bug to track this?