Unsolved Get a window back on normal level after put it on top level
-
Hi and welcome to devnet,
Can you check the window flag example to see it's working properly ?
-
First of all thanks for your reply. I already tried that example and when I check the <<Window stays top>> checkbox it goes to top level but when I unchecked or check <<Window stays bottom>> checkbox it still says top level.
-
Which OS/Qt version are you running ?
-
Ubuntu 16.04 LTS
Qt Creator 4.0.3
Based on Qt 5.7.0 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit) -
That's the Qt Creator version, which one is Qt itself ?
Also, can you test the same thing with your distribution provided Qt ?
-
I am using Qt 5.7.0.
I did test it but it is the same result. -
Try adding the
Qt::X11BypassWindowManagerHint
to your calls changing the flags. -
According to the documentation Qt::X11BypassWindowManagerHint means that the window will be borderless
and that is exactly what it becomes when I add that flag. The point is when i try to debug the code in my first message like this (qDebug() << windowFlags() ), I have something like this:- when the checkbox is checked:
QFlags<Qt::WindowType>(Window|X11BypassWindowManagerHint|WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowStaysOnTopHint|WindowCloseButtonHint|WindowFullscreenButtonHint)
--when it is unchecked :
QFlags<Qt::WindowType>(Window|X11BypassWindowManagerHint|WindowTitleHint|WindowSystemMenuHint|WindowMinMaxButtonsHint|WindowCloseButtonHint|WindowFullscreenButtonHint)
As you can see when it is unchecked there is no WindowStaysOnTopHint flag anymore but i do not know why it is not working.
-
Might be related to QTBUG-53711
-
Thank for all your replies by the way.