PDA

View Full Version : how to set labels to two different markers using a picker



bss
9th May 2011, 09:32
hello
i am using qwt6.6.0 and qt 4.7.2 for fedora8
i am using two different qwtplots in a single window.Each plot is having two vertical markers which show the xaxis point.
I am using QwtPlotPicker's moved(QPoint &pos)signal to get the pos.x point.then i am placing marker1 to pos.x
how to attach the picker with two different markers.

Uwe
10th May 2011, 06:29
Using QwtPlotPicker::moved is not a good idea as it replots for every mouse movements - what might be too slow if you have a more challenging scene. Better hide your markers at the beginning ( should be the moved() signal ) of your selection and show them at the end at the new position ( selected() ). While the selection is active you have the vertical line rubberband of the picker.

To your question - what's the problem with connecting the picker signals with slots of several plots ?

Uwe