Hi,
I have now integrated a PlotPicker in my QwtPlot and coded a function which should set the picked x and y location in two QLabes:
Code:
void MainWindow::valuePlotPickerSelected( const QwtDoublePoint& point) { valuePlotX->setText(temp); temp.setNum(point.y()); valuePlotY->setText(temp); }
This seems to work most of the time. But when I don't replot or even sometimes when i replot it sets the x value to 0.
Y value is allways correct, but I sometimes can pick many points and it is sheer luck if the x value is correct or 0.
What could the problem be? Is it a problem, that there can be less x values than I have pixels on the QwtPlot?
Thanks for taking the time!
sun