Hello,
I just wanted to change the behaviour of my Zoomer, so that the zoom in effect is not affected from the Leftbutton, but from the Rightbutton, thus I could use LeftButton for selection in QwtPlotPicker.
Unfortunately, I don't understand what the statement means:
Qt::RightButton, Qt::ControlModifier);
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier);
To copy to clipboard, switch view to plain text mode
QwtEventPattern::MouseSelect2 means already that the Rightbutton will be used, why then the second parameter Qt::RightButton? How can I change zoom function from LeftButton to Rightbutton? I use the zoomer from spectrogram example.
#if QT_VERSION < 0x040000
Qt::RightButton, Qt::ControlButton);
#else
Qt::RightButton, Qt::ControlModifier);
#endif
Qt::RightButton);
panner
->setAxisEnabled
(QwtPlot::yRight,
false);
panner->setMouseButton(Qt::MidButton);
QwtPlotZoomer* zoomer = new MyZoomer(canvas());
#if QT_VERSION < 0x040000
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlButton);
#else
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier);
#endif
zoomer->setMousePattern(QwtEventPattern::MouseSelect3,
Qt::RightButton);
QwtPlotPanner *panner = new QwtPlotPanner(canvas());
panner->setAxisEnabled(QwtPlot::yRight, false);
panner->setMouseButton(Qt::MidButton);
To copy to clipboard, switch view to plain text mode
For the panning function it is straightforward, that the MidButton will take over this action, but for zoom in and zoom out, it is not clear for me. Please explain it to me.
Thank you.
best regards
Bookmarks