This doesn't fit into the concept of the state machine of a picker, that handles single mouse buttons in combination with the keyboard modifiers only. So you have to fool the picker.
Configure your zoomer for using the left mouse button ( = default ) and reimplement QwtZoomer::widgetMousePressEvent like this (untested):
virtual void YourZoomer
::widgetMousePressEvent(QMouseEvent *e
) {
if ( ( e->button() == Qt::LeftButton || e->button() == Qt::RightButton )
&& (e->buttons() == Qt::LeftButton | Qt::RightButton) )
{
Qt::LeftButton, Qt::NoButton, Qt::NoModifier );
}
}
virtual void YourZoomer::widgetMousePressEvent(QMouseEvent *e)
{
if ( ( e->button() == Qt::LeftButton || e->button() == Qt::RightButton )
&& (e->buttons() == Qt::LeftButton | Qt::RightButton) )
{
QMouseEvent me(e->type(), e->pos(),
Qt::LeftButton, Qt::NoButton, Qt::NoModifier );
QwtPlotZoomer::widgetMousePressEvent(&me);
}
}
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks