Results 1 to 5 of 5

Thread: HistogramItem and Qgradient

  1. #1
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default HistogramItem and Qgradient

    Guys,

    any way to add a color gradient to a HistogramItem ? instead of plain color ?

    thanks

    Michael

  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: HistogramItem and Qgradient

    If you mean HistogramItem from the Qwt examples you have to modify its implementation. The brush that is used to fill the bars need to be initialized by your gradient instead of a color. In Qwt 6.x ( SVN trunk ) you can modify the palette ( QwtColumnSymbol::setPalette() ) that is used to draw a column of a QwtPlotHistogram.

    Uwe

  3. #3
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HistogramItem and Qgradient

    thanks Uwe,

    l downloaded qwt6 and compiled it ( only the source, there is errors for the examples)

    When l try to compile my code with qwt6 ...looks like QwtDoubleInterval has been removed from the library ...

    regards,

    Michael

  4. #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: HistogramItem and Qgradient

    Quote Originally Posted by OverTheOCean View Post
    l downloaded qwt6 and compiled it ( only the source, there is errors for the examples)
    What errors ?
    When l try to compile my code with qwt6 ...looks like QwtDoubleInterval has been removed from the library ...
    And 5 seconds later you will have found a class QwtInterval.

    Qwt 6.x is by far not source code compatible ( f.e Qt 3 support has been dropped ) but in opposite to Qwt 5.x it has an implementation of a plot item for histograms - not only an example showing how you could implement one.

    Uwe

  5. #5
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HistogramItem and Qgradient

    yes l've got all kind of error messages ...l came over by using the qwtconfig file from qwt5.2.0

    now everything is working, and l'm able to set a Gradiant on the histogram...that 's nice.

    any idea when you will release this rev6 ?

    regards,

    Michael

Similar Threads

  1. Problems with painting a Qgradient
    By sacrif in forum Newbie
    Replies: 4
    Last Post: 20th January 2010, 17:27
  2. color table with QGradient and QImage
    By desch in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2008, 11:32

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.