Results 1 to 2 of 2

Thread: How to adapt the QwtScaleDraw to my needs ?

  1. #1
    Join Date
    Aug 2010
    Posts
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to adapt the QwtScaleDraw to my needs ?

    Hi Folks,

    I Just want to overload the QwtScaleDraw Class (MyScaleDraw) in that way so that my Histogram must show 1 or 2 or .. n Balks (depending of the number of QStringList elements) and also I want the x-scaling of my Histogram to be conform accordingly; Means: If QStringList.size() = 2 -> then please only 2 Balks are needed AND the scaling of the x-Axis has only 2 elements;

    Can someone of you help please ?

    Many Thanks in advance.

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

    Default Re: How to adapt the QwtScaleDraw to my needs ?

    A histogram has nothing to do with how the scale is displayed !

    Guess what you want to implement is a multi bar item ( several y values for one x value displayed as a block of several bars with different colors centered to the x-position ). Such an item doesn't exist in Qwt, but it is not so hard to be implemented - as long as you have a solid background with Qt.

    I recommend to use Qwt 6 and to derive from QwtPlotSeriesItem.

    Uwe

Similar Threads

  1. Replies: 5
    Last Post: 12th August 2011, 22:55
  2. Replies: 0
    Last Post: 12th January 2010, 18:27
  3. HowTo adapt window to my screensize?
    By bnilsson in forum Qt Programming
    Replies: 1
    Last Post: 19th July 2008, 15:37

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.