Results 1 to 2 of 2

Thread: How to get the selected point index with QwtPlotPicker

  1. #1
    Join Date
    Dec 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to get the selected point index with QwtPlotPicker

    Hi !

    I plot complex data using QwtPlot, so, I reimplement QwtSeriesData for converting my data into QPointF. The "sample(int)" converts MyObject to QPointf. My QwtSeriesData data manages a myVector=vector<MyObject>.

    Now, I need to select point drawn into my plot. I try to use QwtPlotPicker but it only returns a QPointF.

    Thus, my question is : How to get the index "idx" of the selected point in order to get myObject=myVector[idx] ?

    I don't know if I am clear :-S
    Last edited by lambdacrash; 19th December 2011 at 10:33. Reason: spelling corrections

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

    Default Re: How to get the selected point index with QwtPlotPicker

    This has been answered many, many times: please use the archive of the forum.

    Uwe

Similar Threads

  1. Replies: 4
    Last Post: 5th February 2011, 08:33
  2. Replies: 1
    Last Post: 12th January 2011, 06:52
  3. Replies: 2
    Last Post: 4th December 2010, 08:09
  4. Replies: 1
    Last Post: 3rd December 2009, 14:23
  5. display a plot point by point
    By oswalidos in forum Newbie
    Replies: 32
    Last Post: 13th March 2009, 15:37

Tags for this Thread

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.