PDA

View Full Version : display order of subwindows in mdi area



eric_vi
10th May 2010, 19:27
on mac if you launch the example mdi provided by qt and open on top of each other 3 subwindows, if you close the one on top it is always the first one created that comes back on top i tried to change the activation order without success.

my own app has the same behavior and i cannot find a way to solve that...

all help very welcome.


thanks

bmhautz
10th May 2010, 22:58
Take a look at the QMdiArea documentation for window order: http://doc.qt.nokia.com/4.6/qmdiarea.html#WindowOrder-enum.

The default is the creation order, and that may be what you are seeing. To change it, call setActivationOrder.

eric_vi
11th May 2010, 03:50
as i mentioned i tried to change the activation order, but that does not work and also the window order changes but i do not get any subwindowactivated signal which is strange

bmhautz
11th May 2010, 16:05
as i mentioned i tried to change the activation order, but that does not work and also the window order changes but i do not get any subwindowactivated signal which is strange

It might be more helpful if you can describe exactly what didn't work and what you have done already (maybe providing source code would help people to see your problems more clearly).

Based on what you have said, I can only assume that the subwindowactivated signal is not firing because you are not activating a subwindow, i.e. it's not getting keyboard focus or setFocus is not being called.

Also, calling setActivationOrder will not immediately change the order of the windows until a new call to subWindowList, cascadeSubWindows, or tileSubWindows is made.

The documentation has all of this information, so it might be worthwhile to read it again if you're having trouble with these concepts. If you're having trouble with something else, then being a little more clear can help us solve your problem better.