View Full Version : Please Help-->selecting point from the qwtplot !

20th March 2008, 11:36
Hello! Friends,
I want to select a point as and when user clicks on the plot.In that i want to get the y-value of curve at that point For which am using QwtPlotPicker class as: -

QwtPlotPicker* picker = new QwtPlotPicker(sampleqwtPlot->canvas);
double pt = curve.y(picker->invTransform(const QPoint& p) const);

But it shows me following error: -

sampleplot.cpp: In member function `void samplePlot::get_point()':
sampleplot.cpp:183: error: no matching function for call to `QwtPlotPicker::QwtP
lotPicker(<unknown type>)'
../../../Qt/qwt-5.0.2/src/qwt_plot_picker.h:30: note: candidates are: QwtPlotPic
ker::QwtPlotPicker(const QwtPlotPicker&)
../../../Qt/qwt-5.0.2/src/qwt_plot_picker.h:41: note: QwtPlotPic
ker::QwtPlotPicker(int, int, int, QwtPicker::RubberBand, QwtPicker::DisplayMode,
../../../Qt/qwt-5.0.2/src/qwt_plot_picker.h:37: note: QwtPlotPic
ker::QwtPlotPicker(int, int, QwtPlotCanvas*)
../../../Qt/qwt-5.0.2/src/qwt_plot_picker.h:34: note: QwtPlotPic

I dont know why its not accepting the given canvas?:confused:

Can anyone please help me out in this?-->I will be thankful.

20th March 2008, 18:43
The brackets are missing: new QwtPlotPicker(sampleqwtPlot->canvas() );


25th March 2008, 14:36
Hello! Uwe Sir,
Thanks very much for helping me out. Now i came to know that how do i do such silly mistakes when am too much tensed.

Thanks again & Best Regards:)