Results 1 to 2 of 2

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

  1. #1
    Join Date
    Dec 2011
    Thanked 1 Time in 1 Post
    Qt products

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

    As the title suggests, I have a long operation where I read file data from a thread to plot. During this, I disable the UI so the user can't click. However, I'm unable to disable my Qwt plot.

    I've tried:


    Neither disable (aka gray-out) the plot area.

    Is there a way to disable the plot area?

    Thanks )

  2. #2
    Join Date
    Feb 2006
    Munich, Germany
    Thanked 871 Times in 819 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    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 

  3. 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


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.