Showing a QDialog while running a fullscreen application shows window decoration around the application under Linux.
-
I have a Qt application which consists of a window (a custom type derived from QGraphicsView). This window is shown in full screen.
Occasionally I show a dialogue (QDialog or derived from it). While showing the dialogue (which has as parent the window) the title bar of the window is shown together with the systems task bar. Closing the dialogue the title bar and task bar disappear again.Note: I am running the application under Ubuntu (16.04) using Unity.
Does anyone know why this happens and how this can be avoided?
Thanks,
Peer -
Try using a native widget (i.e. don't give the dialog a parent), it probably is a window manager specific. Also if you could try on a another platform might shed some light if it's constrained to unity only.
-
Try using a native widget (i.e. don't give the dialog a parent), it probably is a window manager specific. Also if you could try on a another platform might shed some light if it's constrained to unity only.
@kshegunov The problem does not appear on Windows 10. So it may be Linux specific or even Unity specific. As I only have Windows 10 and Ubuntu with Unity here I can not do any other test. Changing from QDialog to QWidget and removing the parent does not solve the problem.
What I now saw is that when moving the dialogue away from the window where the full screen application is to my other monitor (I am having a multi monitor setup) then the title disappears and everything is fine. Moving it back above the full screen app the title appears again :/
-
@kshegunov The problem does not appear on Windows 10. So it may be Linux specific or even Unity specific. As I only have Windows 10 and Ubuntu with Unity here I can not do any other test. Changing from QDialog to QWidget and removing the parent does not solve the problem.
What I now saw is that when moving the dialogue away from the window where the full screen application is to my other monitor (I am having a multi monitor setup) then the title disappears and everything is fine. Moving it back above the full screen app the title appears again :/
@Peer-Schneider said in Showing a QDialog while running a fullscreen application shows window decoration around the application under Linux.:
Changing from QDialog to QWidget and removing the parent does not solve the problem.
I meant only giving
nullptr
as parent of the dialog (as dialogs are already widgets), but in any case this shouldn't change the results of the test. Anyway, if you could prepare a very simple reproducible example I could test on my KDE. I'd speculate, however, that this is some Unity peculiarity as you report it doesn't happen on windows. -
@Peer-Schneider said in Showing a QDialog while running a fullscreen application shows window decoration around the application under Linux.:
Changing from QDialog to QWidget and removing the parent does not solve the problem.
I meant only giving
nullptr
as parent of the dialog (as dialogs are already widgets), but in any case this shouldn't change the results of the test. Anyway, if you could prepare a very simple reproducible example I could test on my KDE. I'd speculate, however, that this is some Unity peculiarity as you report it doesn't happen on windows.- Ubuntu with Unity here I can not do any other test.
If a virtual machine, it would be very fast to install say KDE or xfce to test with.
That is the charm of linux. Freedom. :)
- Ubuntu with Unity here I can not do any other test.
-
@kshegunov I tested both, removing its parent and changing it to QWidget (and there also make it non-modal), no change as I wrote. Yeah, I think, too, that this has something to do with Unity. I will put a test on another window manager on my todo list. I will see whether I find the time to quickly create a small test app later.
@mrjj With VirtualBox this is luckily not a problem, this is true. Only problem here is the sloooow internet connection so I can't quickly install one, it takes some planning ;)
Thanks both of you!