PDA

View Full Version : make label of QwtPlotMarker invisible



rambo83
26th November 2009, 12:01
Hello,

I would like to use the member variable "label" of QwtPlotMArker to check, which index it has, but I don't want the labels to be shown on the plot.
In a FOR loop I generate some markers and give them labels of loop iteration, so that later I will be able to recognize after selection which of the markes was selected by read the label. Explanation why I want to do so: in my case marker represent a sample point, which is of other class and has got variables for x and y coordinates. So there must be relation between sample point and marker. If I move the marker, the variables of sample points have to be updated by the coordinates of marker. Therefore my idea is to check which of markers is selected and update the corresponding sample point. I suppose it would be possible to subclass QwtPlotMarker and insert there the member variable of type integer and set the iterations number of FOR loop there and after selection just read out this member variable, but I don't want to make new class.
How can I set the labels invisible, then?

Thank you

Vitali

Uwe
26th November 2009, 12:39
User marker->setTitle() instead.

Uwe