Results 1 to 2 of 2

Thread: Any way to disable the whole plot (gray-out)?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Any way to disable the whole plot (gray-out)?

    "plot->setEnabled( false );" should be fine, but you need to assign a palette to the plot canvas, where the brush is different for QColorGroup::Disabled.

    Qt Code:
    1. pal.setBrush( QPalette::Window, Qt::blue );
    2. pal.setBrush( QPalette::Disabled, QPalette::Window, Qt::gray );
    3. plot->canvas()->setPalette( pal );
    To copy to clipboard, switch view to plain text mode 
    Uwe

  2. The following user says thank you to Uwe for this useful post:

    alketi (12th April 2020)

Similar Threads

  1. Replies: 3
    Last Post: 20th March 2014, 07:44
  2. Replies: 2
    Last Post: 3rd September 2013, 10:26
  3. Disabling does not gray-out buttons
    By lotek in forum Newbie
    Replies: 4
    Last Post: 13th October 2010, 10:48
  4. dark gray style
    By gjaegy in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2010, 23:39
  5. dark gray widgets/background
    By momesana in forum Qt Programming
    Replies: 8
    Last Post: 17th June 2007, 09:39

Tags for this Thread

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.