A solution that worked for me was saving "zoomRect" and then restoring using "setZoomRect"
Qt Code:
  1. QRectF zoomRect()
  2. {
  3. const QwtScaleDiv &xs = this->axisScaleDiv( QwtPlot::xBottom);
  4. const QwtScaleDiv &ys = this->axisScaleDiv( QwtPlot::yLeft );
  5. QRectF rect = QRectF( xs.lowerBound(), ys.lowerBound(), xs.range(), ys.range() );
  6. return rect;
  7. }
  8.  
  9. void setZoomRect(const QRectF& r)
  10. {
  11. d->zoomer->zoom(r);
  12. }
To copy to clipboard, switch view to plain text mode