Results 1 to 5 of 5

Thread: window stacking order

  1. #1
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default window stacking order

    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?



    Thanks

    Nupul

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: window stacking order

    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.

  3. #3
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: window stacking order

    Quote Originally Posted by wysota
    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
    Last edited by nupul; 10th April 2006 at 05:35.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: window stacking order

    Quote Originally Posted by nupul
    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!
    Qt Code:
    1. #include <QApplication>
    2. #include <QDialog>
    3.  
    4. int main(int argc, char **argv){
    5. QApplication app(argc, argv);
    6. QDialog dlg1;
    7. QDialog dlg2(&dlg1);
    8. dlg1.show();
    9. dlg2.show();
    10. return app.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 

    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.

  5. #5
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Wink Re: window stacking order

    Thanks.

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

    Nupul

Similar Threads

  1. How to set Qt window transparent?
    By montylee in forum Qt Programming
    Replies: 17
    Last Post: 24th December 2013, 20:11
  2. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 12:20
  3. QMain Window Problem
    By maveric in forum Qt Programming
    Replies: 1
    Last Post: 24th May 2008, 15:51
  4. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  5. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.