Hi All,

For my application i have to enable the zoom mode when both the mouse buttons are pressed and zoom the selected the region when both mouse buttons are held together and dragged.I am able to zoom it with the both buttons.But it is also working with only left button.I want the zoom feature only when both the buttons are pressed.How can i disable it with the left mouse button.

refer to my code:

constructor:
m_ptrZoomer = new QwtPlotZoomer(plot()->xBottom,plot()->yLeft,plot()->canvas());
m_ptrPanner = new QwtPlotPanner(plot()->canvas());
m_ptrPicker = new QwtPlotPicker(QwtPlot::xBottom, QwtPlot::yLeft,
QwtPicker::RectSelection | QwtPicker:: DragSelection,QwtPicker::RectRubberBand, QwtPicker::ActiveOnly,plot()->canvas());
m_ptrZoomer->setMousePattern((QwtEventPattern::MouseSelect2,Qt ::RightButton,Qt::ControlModifier);

QMousePressEvent:

m_ptrZoomer->setEnabled(true);
m_ptrPanner->setEnabled(true);
m_ptrPicker->setEnabled(true);

thanks,