PDA

View Full Version : Drag Text on QPainter with left button of mouse movement



amitpatel22
20th June 2011, 12:47
Hi...

I have drawed text on QPaint with QPainterPath.I have all the co-ordinates of the text.Now i want to drag text on QPaint with left mouse button.

So please tell me the solution of this problem.
Waiting for quick reply..

Thanks.
Amit

Rachol
20th June 2011, 12:52
You must reimplement mouseMoveEvent, check what buttons are pressed and if left button is pressed then change the text coords by the offset between lastPos() and pos() and call update();