Zoom to simply widen the widget on a scroll pane
Hello!
I've been trying to do a simple (I think) thing:
I've got a QScrollArea with my Plot widget (which derive from QwtPlot) attached. I want to zoom in/out with specific pushbuttons. Is it possible, that the "zooming" would only widen the whole widget, so the scroll area would widen also, and I would just scroll with scrollbars to see other kind of a plot? In other words: the push button would change (widen) the "step" of the axis div. The idea looks very simple to me, but I cannot find (or think) a simple way to do it.
I know that there are things like QwtPanner and Magnifier and Zoomer, or the ScrollZoomer class in "Realtime" example, but this all seems to me like a "triumph of form over content".
Oh, and right now I'm interested in horizontal zoom only, but I think it shouldn't make much difference.
Thanks in advance!
Re: Zoom to simply widen the widget on a scroll pane
Quote:
Originally Posted by
dontgonearthecastle
I've got a QScrollArea with my Plot widget (which derive from QwtPlot) attached.
Bad idea you will have a horrible performance running out of of memory, when you zoom in deep.
Have a look at the realtime example that uses scrollbars without these problems.
Uwe
Re: Zoom to simply widen the widget on a scroll pane
Ohh, right. I forgot that in my case the whole graph would be reploted everytime.
Well, you convinced me, thanks a lot :)