Results 1 to 3 of 3

Thread: QwtScaleDraw - Hide Scale before QTime(0,0,0) ?

  1. #1
    Join Date
    Oct 2013
    Location
    Quebec
    Posts
    31
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default QwtScaleDraw - Hide Scale before QTime(0,0,0) ?

    Hey,

    I'm trying to hide the scale so that I don't get this invalid value before 00:00
    See image:
    https://www.dropbox.com/s/fblzeo5g8d...djust.png?dl=0

    My custom plot is using this QwtScaleDraw:

    Qt Code:
    1. class TimeScaleDraw: public QwtScaleDraw {
    2. public:
    3. TimeScaleDraw( const QTime &base ):
    4. baseTime( base )
    5. {
    6. }
    7.  
    8. virtual QwtText label( double v ) const {
    9. QTime upTime = baseTime.addSecs( static_cast<int>( v ) );
    10. return upTime.toString();
    11. }
    12.  
    13. private:
    14. QTime baseTime;
    15. };
    To copy to clipboard, switch view to plain text mode 

    Any help/clues appreciated!
    Thanks

  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: QwtScaleDraw - Hide Scale before QTime(0,0,0) ?

    The scale interval is manually assigned by your code or calculated from the bounding rectangles of the plot items, that have the QwtPlotItem::AutoScale ( usually the curves ).

    Uwe

  3. #3
    Join Date
    Oct 2013
    Location
    Quebec
    Posts
    31
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QwtScaleDraw - Hide Scale before QTime(0,0,0) ?

    Thanks Uwe,
    Have figured it out now

    By the way, is there releases notes on the new version 6.1.2 to see different from previous version?
    Trying to figure out if it's worth upgrading for me, I'm using qwt-6.1.0
    What I'm looking is maybe performance gain on replot() and stuff related to that.

Similar Threads

  1. How to hide part of a QwtPlot scale?
    By Momergil in forum Qwt
    Replies: 2
    Last Post: 6th February 2013, 20:41
  2. LayoutDirectoin of QwtScaleDraw
    By jesse_mark in forum Qwt
    Replies: 1
    Last Post: 2nd November 2012, 08:31
  3. Replies: 2
    Last Post: 14th September 2011, 08:53
  4. Scale MdiSubWindows after Dockwidget hide()
    By Ginsengelf in forum Qt Programming
    Replies: 3
    Last Post: 6th August 2009, 15:00
  5. how to hide the scale in qwt plot
    By babu198649 in forum Qwt
    Replies: 2
    Last Post: 7th March 2008, 07:38

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.