Hi,
I am using a QwtPlotPanner to pan a plot.
I connect to the QwtPlotPanner:
anned(int,int) signal and in the slot I want to convert the dx value to the corresponding value on the plot.
What I am doing:
I click the plot and pan it by 5 units (by checking the axis values)
Then in my slot I debug a few values as follow:
double dxInv
= plot
->invTransform
(QwtPlot::xBottom, dx
);
qDebug() << "dx : " << dx;
qDebug() << "dxInv: " << dxInv;
double dxInv = plot->invTransform(QwtPlot::xBottom, dx);
qDebug() << "dx : " << dx;
qDebug() << "dxInv: " << dxInv;
To copy to clipboard, switch view to plain text mode
and the output is:
dx : -81
dxInv: 49.768
dx : -81
dxInv: 49.768
To copy to clipboard, switch view to plain text mode
If I pan 10 units I get:
dx : -159
dxInv: 49.8353
dx : -159
dxInv: 49.8353
To copy to clipboard, switch view to plain text mode
What should I do to actually get the panned amount in the coordinates of the axis (5 in the first example and 10 in the second)?
Regards,
Bookmarks