Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Is there any idea how to make a custom gesture for many grab points of a mouse cursor?
If a user move a cursor like a circle, so the program recognize it for a special task.
Now my idea is to record every mouse pixel using mousePressEvent(), and from a number of pixels I will calculate the center of the circle gesture to find its center.
Is there any opinion to help, I appreciate your suggestion. Thank you
Sam last edited by
For custom gesture you can subclass "QGestureRecognizer":http://qt-project.org/doc/qt-5.0/qtwidgets/qgesturerecognizer.html#details class but for that you need to check for Gesture Programming Examples first.
Thank for suggestion, but it was for swipe. I found just now about a product like StrokeIt and mention about plugin. Is it possible using Qt and plugin, is there a suggestion and tutorial about plugin and Qt. Thanks..
jazzycamel last edited by
There was an excellent article in Qt Quarterly by John Thelin on the subject of custom mouse gestures which you can find "here":http://doc.qt.digia.com/qq/qq18-mousegestures.html. I've produced two derivative examples of this: the "first":http://www.gulon.co.uk/2013/01/09/recognising-mouse-gestures-with-pyqt4/ mirrors John's work and the "second":http://www.gulon.co.uk/2013/01/14/pyqt4-mouse-gestures-part-deux/ uses/subclasses "QGestureRecognizer":http://qt-project.org/doc/qt-5.0/qtwidgets/qgesturerecognizer.html#details (as mentioned by Sam). They are written in/for Python/PyQt4 but the general principles and mechanisms are relevant to Qt whatever the language.
Hope this helps ;o)
Thank you very much for the references... This is very helpful... :)