Can't you parent these widgets to some other QObject like the application instance? You can still close them with the main window by connecting their close() slot to a signal that you emit yourself from inside the main window closeEvent() handler. The behaviour is the same.
As for the on-top behaviour, when the widgets are not parented to the main window anymore, I think setting WA_ShowWithoutActivating on the new widget 'before' showing it, then showing it and then using activateWindow() on the main window (or whatever widget was at the top before the creation of this new widget) to ensure it continues as the top window, is worth a try.
http://stackoverflow.com/a/1022121/4206247
Bookmarks