I'm using QwtPlot with a zoomer and panner and everything is fine. But the users would like to be able to optionally constrain the box zoom to be horizontal or vertical. In other words, they would like to hold down shift while dragging the mouse and have the top y position of the zoom box be fixed at 0 and the bottom y position fixed at the bottom of the canvas. The x range of the box would be as normal. The drawn rubber band rectangle should also reflect this. Similarly, when Ctrl is held down while dragging the mouse, the box would stretch in x from 0 to the canvas width. I see in QwtPicker that there is a HLineRubberBand and VLineRubberBand which sound like what I want but I can't seem to get them to work like I expect. I also have no idea how to hook them up to the shift/ctrl key modifiers for the mouse drag events.

Has anyone done something like this? Is there an easy way to do it other than hacking drawRubberBand()?
Thanks.