Unsolved How to make line Dragable/Movable along the graph ?
-
I'm developing a graph, in which I want two horizontal and vertical lines which also be movable/dragable.
Now using QWT libraries, in which I have used QwtPlotScaleItem to draw line, but unable to drag the line. May be I can use mouse event but not sure how to use it for this purpose.
Can please someone help me on that ? -
@npatil15 said in How to make line Dragable/Movable along the graph ?:
QwtPlotScaleItem
You should work with mouse events. I have not use this class. You need to check its code, see how to integrate mouse events inside the graph.
-
@dheerendra I Have tried with mouse move event, but its not smooth, but I want to click on line and then drag.
-
I'm not sure how you are handling the mouse & how qwt does. In general when you click on the line you need handle the mouseevent and change x, y of the line & call the update. This forces paintEvent(..) method to be called again.