Results 1 to 4 of 4

Thread: QwtPlot axis Color

  1. #1
    Join Date
    Dec 2013
    Location
    Jerada, Morroco
    Posts
    106
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QwtPlot axis Color

    Hi everybody,

    How to change the color of the QwtPLot axis' ?

    Thanx in advance

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

    Default Re: QwtPlot axis Color

    In general all colors of a widget ( here it is a QwtScaleWidget ) can be adjusted by using QWidget::setPalette(). The palette is usied this way: http://qwt.sourceforge.net/class_qwt...6d0ee8518fa5a6
    Beside that you can set individual colors for each Label using QwtText::setColor().

    Uwe

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

    hassinoss (17th April 2014)

  4. #3
    Join Date
    Dec 2013
    Location
    Jerada, Morroco
    Posts
    106
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QwtPlot axis Color

    Thanx for your response, but it likes that this solution has some conflicts with qstyleSheet, because when i apply a styleSheet to my widget the setPalette don't work, can i set the color of axis just with qstyleSheet ?

  5. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot axis Color

    The concept of Qt style sheets is somehow limited as it can't be extended for custom widgets, but at least what you have is what is derived from the base class - what AFAIR includes setting the palette.
    In examples/stylesheets you find a couple of stylesheets, f.e. try to start "bode -stylesheet .../examples/choco.css"

    Uwe

Similar Threads

  1. QwtPlot axis labels
    By Kutuska in forum Qwt
    Replies: 7
    Last Post: 29th August 2012, 17:08
  2. QwtPlot x axis label
    By ldg20 in forum Qwt
    Replies: 5
    Last Post: 17th July 2012, 08:02
  3. QwtPlot - multiple axis
    By MukundanAR in forum Qwt
    Replies: 1
    Last Post: 7th March 2012, 08:53
  4. QwtPlot - multiple axis
    By MukundanAR in forum Newbie
    Replies: 0
    Last Post: 6th March 2012, 12:50
  5. QwtPlot legend with axis
    By desantossierra in forum Qwt
    Replies: 5
    Last Post: 20th January 2012, 15:05

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.