Results 1 to 4 of 4

Thread: graying out window?

  1. #1
    Join Date
    Jan 2006
    Posts
    39
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default graying out window?

    Hi,

    I'm wondering if people have good ways to gray out an entire window. I'd like my entire main window to appear grayed out when a dialog is active (to further emphasize that the window is inactive and can't be used), then come back to normal when the dialog is dismissed.

    I was thinking of just laying a big QPixmap filled with semi transparent white over the whole thing, but I don't know that that is the best idea.

    Any comments or help would be appreciated.

    Thanks,
    Derek

  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: graying out window?

    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Posts
    39
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: graying out window?

    I had thought of that and dismissed it since any custom drawn widget (which most of them are) would have to have additional code added to know what to do when it was disabled.

    If there's no easier way that's fine, I was just hoping someone else had experience with something quicker.

    Thanks for the reply.
    Derek

  4. #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: graying out window?

    Quote Originally Posted by drkbkr View Post
    I had thought of that and dismissed it since any custom drawn widget (which most of them are) would have to have additional code added to know what to do when it was disabled.
    Yeah, custom widgets should take their own state into account and choose the correct palette color group (active, inactive, normal, disabled) while painting controls.
    J-P Nurmi

Similar Threads

  1. Independant window in an application
    By titoo in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2007, 11:07
  2. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  3. Replies: 3
    Last Post: 23rd July 2006, 18:02
  4. Move window in Clone Mode
    By ultrabrite in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2006, 18:22
  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
  •  
Qt is a trademark of The Qt Company.