Results 1 to 5 of 5

Thread: super modal window!!

  1. #1
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default super modal window!!

    Hello,

    I'd like to put a window on top of the desktop so nobody can interact with other applications below that window.

    The user only should can interact with the others windows (of other applications) when the top window will be closed.

    How to do it...???

    Thanks in advance!!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: super modal window!!

    Maybe Qt::WindowStaysOnTopHint ?
    It's a WindowFlag so you either pass it when you construct the window or set it later via setWindowFlags().

    Last edited by momesana; 17th April 2008 at 16:20.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: super modal window!!


  4. #4
    Join Date
    Jul 2007
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: super modal window!!

    Thanks for the answer, but it's only for control a window for one application. I need control all windows in the Desktop of several application. When this window is on the screen the user only will can interact with this window and will not interact with others windows of other applications (the user we can't use them)

    thanks!!!

  5. #5
    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: super modal window!!

    Theoretically there is no way to do what you want You may try to cheat by making your window full screen, but as long as the user will be able to kill your application or use alt+tab, you won't be able to force him to stay within your app. So either intercept all events on the X server or cooperate with the window manager to lock the screen using its techniques (with KDE you can use dcop for that).

Similar Threads

  1. QMainWindow modal from non-qt window?
    By hickscorp in forum Qt Programming
    Replies: 3
    Last Post: 21st November 2008, 09:10
  2. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  3. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08:16
  4. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21

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.