Hello,

I have got the same problem, because of size 0 of the boundingRect() the item cannot be found:

Qt Code:
  1. void Plot::cursorSelected(const QwtDoublePoint &Point)
  2. {
  3. //selectedPoint = NULL;
  4. std::cout << "in Plot::cursorSelected, selectedPoint = " << selectedPoint << std::endl;
  5. const QwtPlotItemList& List = itemList();
  6. QwtPlotItemIterator Iter = List.begin();
  7. for ( QwtPlotItemIterator it = List.begin();it != List.end(); ++it )
  8. {
  9. std::cout << "(*it) "<< (*it) << std::endl;
  10. if ( (*it)->rtti() == QwtPlotItem::Rtti_PlotMarker )
  11. {
  12. QwtPlotMarker *mark = ((QwtPlotMarker*)(*it));
  13. QwtDoubleRect rec = mark->boundingRect();
  14. std::cout << "mark->boundingRect()" <<rec.width()<<rec.height()<< std::endl;
  15. if(mark->boundingRect().contains(Point)){
  16. std::cout << "MATCH" << std::endl;
  17. selectedPoint = dynamic_cast<QwtPlotMarker*>(mark);
  18. std::cout << "selectedPoint = " << selectedPoint << std::endl;
  19. }
  20. else selectedPoint = NULL;
  21. }
  22. }
To copy to clipboard, switch view to plain text mode 

What do you mean by using Pixel coordinates? Di you mean I have to transform them like that? :
Qt Code:
  1. double x = this->transform(mark->xAxis(),Point.x());
  2. double y = this->transform(mark->yAxis(),Point.y());
  3. QwtDoublePoint trPoint = QwtDoublePoint(x,y);
To copy to clipboard, switch view to plain text mode 

I also uses this, but it does not work too. Perhaps because I did not expansed the size of boundingRect. How can I do it?