Hallo,
Though there's been post previously on more or less similar issue I can't figure out my problem. Any help would be great.
In my plot I could use zoom-in perfectly okay using left mouse button. But while using right-button to zoom out there is some problem.
Say, I zoom 2 times: org->stage 1->stage 2. Then on right click once it gets back to stage 1. But when I right click again the plot vanishes, and
the y-axis scale shows 0-1000. Irrespective of how many times it was zoomed, the last click (right) always shows the same (i.e no plot & 0-1000 scale).
{
public:
Zoomer
( int xAxis,
int yAxis,
QWidget *canvas
): {
setRubberBandPen
( QColor( Qt
::darkGreen ) );
Qt::RightButton, Qt::ControlModifier );
Qt::RightButton );
}
...
};
class Zoomer: public QwtPlotZoomer
{
public:
Zoomer( int xAxis, int yAxis, QWidget *canvas ):
QwtPlotZoomer( xAxis, yAxis, canvas )
{
setRubberBandPen( QColor( Qt::darkGreen ) );
setTrackerMode( QwtPlotPicker::AlwaysOn );
setMousePattern( QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier );
setMousePattern( QwtEventPattern::MouseSelect3,
Qt::RightButton );
}
...
};
To copy to clipboard, switch view to plain text mode
Bookmarks