QFileDialog objects appear behind main window when called for the second time onwards on Unity in Ubuntu 14.04
-
Hello,
I am having this strange behaviour, in which QFileDialog objects appear behind the main window when invoked for the second time in the stock Unity that came with Ubuntu 14.04. The objects all have parent objects.
I am running the 64-bit version of the OS. This issue does not arise in Windows 10 or in Gnome.
Any hints/pointers on how to resolve this?
Thank you very much!
-
@Eyeless really sorry for the late reply! Just realised you have replied to me. After some testing I have solidified the conclusion that it is not a Qt problem, as was expected. As such, there is no reason to post my trivial dialog code.
I am writing this for posterity's sake.
This issue is caused due to the focus stealing prevention mechanism by Unity. The user could change Unity's default behaviour by issuing in a terminal the command:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 0
This will allow for the consequent dialogs to appear in front of their parents, as expected.