Results 1 to 5 of 5

Thread: Force a QDialog to be the top-level Window and to stay at this level ?

  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Force a QDialog to be the top-level Window and to stay at this level ?

    Hello,

    I set my QDialog to be the top-level Window, using activateWindow().
    My problem is that if the user clic on another Window (of an another application), the new Window is set to the top-level and mine is no more visible...

    I would like to know if it is possible to block my QDialog at the top-level, and prevent it from being "hiden" by another Window ?
    In fact, this would be like the QTextBox widget : the window stays at top-level and the user can't clic on other windows if he hasn't close the QTextBox.

    My QDialog is used to give informations to my user, and is very small : it's like a bubble just above the system tray. I want it to be visible all the time. I've tried to use signals/slots to set it at top-level each time an other Window is set in front of mine, but I didn't find any helpfull signal.

    Thanks for your ideas

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Force a QDialog to be the top-level Window and to stay at this level ?

    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    Nyphel (4th June 2007)

  4. #3
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Force a QDialog to be the top-level Window and to stay at this level ?

    3 minutes to answer...
    Are you a bot ?

    Thanks JPN

  5. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Force a QDialog to be the top-level Window and to stay at this level ?

    Quote Originally Posted by Nyphel View Post
    3 minutes to answer...
    Are you a bot ?

    Thanks JPN
    Heh, I just happened to refresh at the moment. No problem.
    J-P Nurmi

  6. #5
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Force a QDialog to be the top-level Window and to stay at this level ?

    Waou thanks a lot, that's exactly what I was searching for since 1 hour !
    And there a more possibilities than what I expected...

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.