Is it possible to have a mouse interaction with a curve?
eg. when i click on a curve some background information is shown in a qt textfield outside of the plot?
thanks and regards
myzinsky
Is it possible to have a mouse interaction with a curve?
eg. when i click on a curve some background information is shown in a qt textfield outside of the plot?
thanks and regards
myzinsky
yup you can do it. Just place the label on the plot and you can able to do, what you wanna do.......
in which example i can have a look?
i have a QwtPlotIntervalCurve!
I want to have each <===> in my plot clickable
phaseDiagram.jpg
You can install an event filter for the plot canvas to handle mouse events - or simply use QwtPlotPicker what does the same ( translating the mouse position into plot coordinates ). Instead of connecting the selected position to a label you could also use the tracker mode of the picker. By overloading QwtPlotPicker::trackerTextF and QwtPlotPicker::trackerText you can modify the text, that is displayed for a specific position.
But identifying how the position is related to the curve ( or any other item on the plot ) needs to be done in application code.
Most Qwt examples use the tracker mode of the picker f.e. bode or spectrogram.
Uwe
Bookmarks