Results 1 to 3 of 3

Thread: Please Help-->selecting point from the qwtplot !

  1. #1
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question Please Help-->selecting point from the qwtplot !

    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: -
    Qt Code:
    1. QwtPlotPicker* picker = new QwtPlotPicker(sampleqwtPlot->canvas);
    2. double pt = curve.y(picker->invTransform(const QPoint& p) const);
    3. yvalueLineEdit->setText(QString::number(pt,10));
    To copy to clipboard, switch view to plain text mode 

    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:isplayMode,
    QwtPlotCanvas*)
    ../../../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
    ker::QwtPlotPicker(QwtPlotCanvas*)
    I dont know why its not accepting the given canvas?

    Can anyone please help me out in this?-->I will be thankful.
    Last edited by Krish; 20th March 2008 at 13:54.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Please Help-->selecting point from the qwtplot !

    The brackets are missing: new QwtPlotPicker(sampleqwtPlot->canvas() );

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    Krish (25th March 2008)

  4. #3
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Solved-->Please Help-->selecting point from the qwtplot !

    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
    Last edited by Krish; 25th March 2008 at 16:45.

Similar Threads

  1. Check a point inside or outside a road?
    By kstking in forum Qt Programming
    Replies: 1
    Last Post: 15th October 2007, 19:48
  2. Moving the (0.0) point on the scene
    By maverick_pol in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2007, 16:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.