Hello Everyone,
I'm using QwtPlotZoomer and QwtPlotMagnifer to zoom in and out,
If I use deep zoom using QwtPlotZoomer then it gets disabled and never used for zooming even after I zoom out using QwtPlotMagnifier.
Here is below I have written simple constructor for QwtPlotZoomer to initialize.
{
//setMaxStackDepth(-1);
setTrackerMode(AlwaysOff);
setMousePattern
(QwtEventPattern::MouseSelect1,Qt
::LeftButton, Qt
::ControlModifier);
setMousePattern
(QwtEventPattern::MouseSelect2, Qt
::NoButton, Qt
::NoModifier);
setMousePattern
(QwtEventPattern::MouseSelect4,Qt
::NoButton,Qt
::NoModifier);
setMousePattern
(QwtEventPattern::MouseSelect5,Qt
::NoButton,Qt
::NoModifier);
}
void ZoomPlot::rescale()
{
emit autoScaleDisable(false);
}
ZoomPlot::ZoomPlot(QwtPlot *plot):
QwtPlotZoomer(plot->canvas())
{
//setMaxStackDepth(-1);
setTrackerMode(AlwaysOff);
setTrackerPen(QPen(QColor(Qt::blue)));
setRubberBand(QwtPicker::RectRubberBand);
setMousePattern(QwtEventPattern::MouseSelect1,Qt::LeftButton, Qt::ControlModifier);
setMousePattern(QwtEventPattern::MouseSelect2, Qt::NoButton, Qt::NoModifier);
setMousePattern(QwtEventPattern::MouseSelect4,Qt::NoButton,Qt::NoModifier);
setMousePattern(QwtEventPattern::MouseSelect5,Qt::NoButton,Qt::NoModifier);
setMousePattern(QwtEventPattern::MouseSelect6,Qt::NoButton);
}
void ZoomPlot::rescale()
{
emit autoScaleDisable(false);
QwtPlotZoomer::rescale();
}
To copy to clipboard, switch view to plain text mode
Can someone explains why it gets disable after deep/multiple zoom in and whats the solution for this?
Thanks
Bookmarks