Record a mouse movement
-
Hi...
Is there a good method to record a cursor movement?. After recording it will be used to select an object that is circled by that movement.
Thanks
Regards,
romeo -
An immediate solution that comes into mind is to push points into a QPolygon in the mouseMoveEvent(). You can then use containsPoint() or get the boundingRect() to determine which object has been selected.
QRubberBand might be another alternative if you are not bound to the circling gesture.
-
Thank you very much, I will explore more.
Regards,
romeo -
I am not quite sure if this only works with touch screens or if they will be recognised from mouse movement as well but if so you should have a look at "QGesture":http://qt-project.org/doc/qt-4.8/qgesture.html
-
Dear Qt-ers,
I already read the help of QGesture, may be this will be the solution, thank you for advice. Is there any other tutorial about QGesture especially creating a custom Gesture?Thank you in advance
-
You can have a look on "this":http://qt-project.org/forums/viewthread/18613/ thread.
-
QpanGestureˊs delta property maybe helpful."Click here":http://qt-project.org/doc/qt-5/qpangesture.html