PDA

View Full Version : window stacking order



nupul
8th April 2006, 08:34
I have an app that gives rise to say 4 windows. I want the top level window (which is full screen)to be the Lowest in the stacking order. Now even when the user clicks on the top level window It shouldn't be raised...else it'll completely hide the child windows. Can I use the Qwidget::lower() function for this? Will It fulfill the above criteria?

:confused:

Thanks

Nupul

wysota
8th April 2006, 22:57
Wouldn't it be better to use some window flags for it?

BTW. (I don't know if this is the case here) If you have a parent-child relationship between windows, the child will always be on top of its parent.

nupul
10th April 2006, 05:23
Wouldn't it be better to use some window flags for it?


Which ones could achieve the effect i mentioned?



BTW. (I don't know if this is the case here) If you have a parent-child relationship between windows, the child will always be on top of its parent.


Yes, but if I focus on the parent won't the parent window show (i.e. overlap the children)? I don't want the child to be modal, i just want the parent window to be at the bottom of the stacking order!

Nupul

wysota
10th April 2006, 09:36
Yes, but if I focus on the parent won't the parent window show (i.e. overlap the children)? I don't want the child to be modal, i just want the parent window to be at the bottom of the stacking order!


#include <QApplication>
#include <QDialog>

int main(int argc, char **argv){
QApplication app(argc, argv);
QDialog dlg1;
QDialog dlg2(&dlg1);
dlg1.show();
dlg2.show();
return app.exec();
}

Compile, run and try to make dlg1 appear on top of dlg2.


Which ones could achieve the effect i mentioned?

Check which flags KDE uses for its "stay on bottom" window behaviour.

nupul
10th April 2006, 10:16
Thanks.

Got it...understood what you were trying to say...and yes.......will go through the KDE sources....:D

Nupul