[Sloved]question about QGesture's malloc.
-
Hi twicave,
QGesture events are created by Qt underlying gesture system itself, and can be handled in the QWidget::event method. So you don't have to create those objects. To handle them you have to subclass QWidget (or a derivated class) and reimplement the event method. You could also use an event filter to catch the event.
Use grabGesture method to tell Qt you want to handle Gesture events.
Have a look at gesture handling "Here":http://doc.qt.digia.com/main-snapshot/gestures-overview.html
-
The QGesture is essentially an object that is kept around to store info in.
The amount of QGesture instances is equal to the amount of gestures you grab, times the amount of widgets you do this on.
Notice that Qt handles this object, and deletes it properly for you at the end of the application.