I don't understand your UI. Do you mean to say that you have a MainWindow with dock widgets, menu., toolbars, etc. and you also have a set of independent top-level windows floating on screen at the same time?
Maybe you can try to pass the Qt::WindowStaysOnTopHint to QWidget::setWindowFlags(), but I do not know if you can change this dynamically (in other words, set and unset the flag for a particular widget on the fly).
Another option would be to use QMdiArea as the central widget of your MainWindow and add all of your document windows to that as children. Then, your main window would always be below your document windows.
Bookmarks