[MeeGo-touch-dev] interception of touch events w/QGestureEvent::accept?
Jackson, Thomas (Tom)
Tom.Jackson at windriver.com
Tue Nov 30 08:08:14 PST 2010
> Hello,
> The mtf gestures are recognized on the level of the QGraphicsView object,
> the touch events or mouse events are redirected to gesture recognizers and
> some of them are transformed into gestures. To intercept touch events and
> mouse events that are used to recognize gesture, you would have to set up
> an event filter on QGraphicsView and swallow some of the touch events when
> you want to send your own gesture event. In that way you could send your
> custom gesture, but IMHO this is going to be hard to implement and very
> error prone.
> I would say, the latter solution is doable. You could make a transparent
> widget on top of the scene and swallow (by calling accept()) gestures that
> you want to stop. Only ignored() gestures will be propagated below your widget.
> Some of our apps do that already. Also MPannableWidget has a "glass" widget which
> handles tap&hold gesture in the way you want to implement.
> Sorry for top-posting, I had to use webaccess.
> BR,
> Michał
That's great. This is exactly the solution we are researching. The default behavior of
QGestureEvent::accept is "Unwanted gestures may be propagated to the parent widget" so this
is ideal. Thanks for the post!
-Tom
More information about the MeeGo-touch-dev
mailing list