Results 1 to 6 of 6

Thread: QwtPlot how to save/restore zoom settings

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Nov 2017
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QwtPlot how to save/restore zoom settings

    Thanks Uwe.
    now using:
    Qt Code:
    1. QRectF CGraph::zoomRect()
    2. {
    3. const QwtScaleDiv &xs = this->axisScaleDiv( QwtPlot::xBottom);
    4. const QwtScaleDiv &ys = this->axisScaleDiv( QwtPlot::yLeft );
    5. return QRectF( xs.lowerBound(), ys.lowerBound(), xs.range(), ys.range() );
    6. }
    7.  
    8. void CGraph::setZoomRect(const QRectF& r)
    9. {
    10. this->setAxisScale(QwtPlot::xBottom, r.left(), r.right());
    11. this->setAxisScale(QwtPlot::yLeft, r.top(), r.bottom());
    12. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by Darent; 4th January 2021 at 18:05.

Similar Threads

  1. QScriptEngineDebugger save/restore breakpoints
    By Muts in forum Qt Programming
    Replies: 0
    Last Post: 26th February 2016, 14:37
  2. save and restore TreeWidgetItem
    By raj_iv in forum Newbie
    Replies: 3
    Last Post: 26th August 2011, 08:12
  3. QWTPlot Zoom: cannot zoom negative value
    By jwieland in forum Qwt
    Replies: 0
    Last Post: 8th January 2010, 16:16
  4. Save & Restore a selection in QTreeWidget
    By youkai in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2008, 19:54
  5. QPainter save() and restore()
    By babu198649 in forum Newbie
    Replies: 4
    Last Post: 28th July 2008, 09:22

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
  •  
Qt is a trademark of The Qt Company.