Unsolved Make main window always stay on top of its child widgets?
-
I have a main window and it can call out a Dialog child window. And I want my main window to always stay on top of the dialog window, but only at the program's level. Adding a flag
setWindowFlag(Qt::WindowStaysOnTopHint)
in the constructor of the main window wouldn't do it because it makes it stay on top of everything in my desktop. -
@lansing said in Make main window always stay on top of its child widgets?:
And I want my main window to always stay on top of the dialog window,
So how do you expect to see your dialog then?
-
I will resize my main window smaller. My dialog will update from changes I make in main window, so I need it to be always on top.
-
@lansing said in Make main window always stay on top of its child widgets?:
My dialog will update from changes I make in main window, so I need it to be always on top.
Strange ui-design... don't set the mainwindow as parent of your dialogs so the main window can overlap them.
-
They can be overlapped right now when I click on anyone of them, I just want the main window to always stay on top.
-
The active windows is in forground - you can't really change this without asking the window manager (so it's wm dependent, nothing Qt can do for you here)
Again: strange ui-design... -
What if I remove the main window from being the parent of the dialog window and then flag the main windows as
Qt::Tool
. Will it work? -
So if your mainwindow is maximized or at the position the dialog is at and you open the dialog, you don't want to see it??
-
I won't be maximizing my main window, it would be relatively small compare to the dialog.