Hi,

I am using QwtPlotPicker::trackertex for showing labels on points. I have setTrackerMode(AlwaysOn); I can easily display x and y values but what I am looking for, is to display special label for each point.
what I am trying to do in following code is...after getting x axis and y axis I wants to search for xaxis value in vector of x values and yaxis value in vector of y values and if the xaxis value and yaxis value matches any value in vector x and vector y then I will use index to retrieve the label for that position from another vector.
Its not giving me any error with this code but also not showing me desired labels.
Qt Code:
  1. #define EPS 1.0e-6 //tolerance for comparing double values
  2. xaxis=pos1.x();
  3. yaxis=pos1.y();
  4. int size=vec_xaxisvalues.size();
  5. for(int index=0;index<size;index++)
  6. {
  7.  
  8. if ((vec_xaxisvalues[index]-xaxis)<EPS && (vec_yaxisvalues[index]-yaxis)<EPS)
  9.  
  10. {
  11. //QwtText text( QwtPlotPicker::trackerText(pos1));
  12. text.setText("good");
  13. return text;
  14. }
  15.  
  16. else
  17. {
  18. return QwtText();
  19. }
  20. }
To copy to clipboard, switch view to plain text mode 

Thanks in advance.

Cheers,