View Full Version : Problem with QwtPlotZoomer

21st November 2007, 07:16
Hi All,

I have a problem while zooming the selected region using QwtPlotZoomer. I am enabling the zoom mode when the RightButton of the mouse is clicked and Left Mouse button to select the region to be zoomed.I am able to zoom the selected region.But when the Right Mouse Button is clicked again,the zoom mode is disabled and the plot is coming to original position(without zoom).


21st November 2007, 09:31
The zoomer maintains the history of your zoom operations in a zoom stack. You can navigate on the stack with mouse and keyboard. In the default configuration the right mouse button is connected to a zoom out ( by one ) operation. So you need to change your input mode.

F.e: the code below redefines the mouse button for the "zoom out by one" operation:

zoomer->setMousePattern(QwtEventPattern::MouseSelect2, Qt::LeftButton, Qt::ControlModifier);