PDA

View Full Version : Activating multiple windows



lixo1
12th May 2009, 18:51
Hello,

My application has 2 QMainWindow, the first window opens the second usign show().
The problem is: when the 2nd window opens the first is hidden by it, and I cannot change the active control to the first when I click on it. This problem occurs only on Microsoft Windows, and you can reproduce it with the example/widget/windowflags.
Is there a QFlag option or something to allow this permutation between the 2 windows?

Thank you very much.

caduel
12th May 2009, 21:27
I don't use windows but maybe this helps
* make sure you don't call setModal() or something like that
* maybe (give it a try) do not pass one window as the other's parent
* maybe some window flags like Qt::Window (should be set by default) help

HTH

lixo1
12th May 2009, 21:54
Hi Caduel,

Thank you for your help, but unfortunately I don't use setModal(), I don't pass one window as the other's parent and I tried Qt::Window, but nothing.

So If I can reformulate the problem, I have 2 QMainWindow, the first launch the second (using show()) and then the first window remains in the 2nd plan (background), I cannot deplace it to the first plan when I click with the mouse.
I can use the first window but it's very incovenient because I cannot put it in the first plan.
I constated this problem only on Windows, because the same application on Linux and Mac works perfectly.
In easy words the first window is always behind the other, prevented its visualization.

Thank you very much for any kind of help.