Greetings,

I am using QwtPlotPicker to track the mouse and get selection events... but how do i translate that to actually selecting a marker ?

The brute force way (below) in the select signal...doesnt really work because the Markers return a bounding rect that has a 0 width/height...

Whats the best way to do this ?

Qt Code:
  1. void PitchSightPlot::cursorSelected(const QwtDoublePoint &Point)
  2. {
  3. List = itemList();
  4. Iter = List.begin();
  5.  
  6. while(Iter != List.end())
  7. {
  8. QwtPlotItem *pItem = (QwtPlotItem *)(*Iter);
  9.  
  10. if(pItem->rtti() == QwtPlotItem::Rtti_PlotMarker)
  11. if(pItem->boundingRect().contains(Point))
  12. qDebug()<< "MATCH" << Point;
  13.  
  14. Iter++;
  15. }
  16. }
To copy to clipboard, switch view to plain text mode