Hey guys,
I have a QwtPlotMagnifier object that I can control fine with the scroll wheel of a mouse, however I want to implement 2 QPushButton's (for zoom in and zoom out) and control the zooming from here.
Any ideas on how I can achieve this?
Hey guys,
I have a QwtPlotMagnifier object that I can control fine with the scroll wheel of a mouse, however I want to implement 2 QPushButton's (for zoom in and zoom out) and control the zooming from here.
Any ideas on how I can achieve this?
Just posting for anyone who's trying to achieve the same thing, I came up with a solution when I had another look at it (it pretty obvious actually).
I simply subclassed the QwtPlotMagnifier class, and then used the rescale() function.
I then create two slots as below, and then connected them to a toggled() signal.
Qt Code:
// Zoom in void MyPlotZoom::zoomIn(void) { } // Zoom out void MyPlotZoom::zoomOut(void) { }To copy to clipboard, switch view to plain text mode
Bookmarks