A solution that worked for me was saving "zoomRect" and then restoring using "setZoomRect"
{
QRectF rect
= QRectF( xs.
lowerBound(), ys.
lowerBound(), xs.
range(), ys.
range() );
return rect;
}
void setZoomRect(const QRectF& r)
{
d->zoomer->zoom(r);
}
QRectF zoomRect()
{
const QwtScaleDiv &xs = this->axisScaleDiv( QwtPlot::xBottom);
const QwtScaleDiv &ys = this->axisScaleDiv( QwtPlot::yLeft );
QRectF rect = QRectF( xs.lowerBound(), ys.lowerBound(), xs.range(), ys.range() );
return rect;
}
void setZoomRect(const QRectF& r)
{
d->zoomer->zoom(r);
}
To copy to clipboard, switch view to plain text mode
Bookmarks