QGesture and QDeclarativeItem
-
Can anyone tell me if I need to do anything extra/undocumented to get a QDeclarativeItem to grab gesture events?
I am using the code described in the documentation (http://goo.gl/4Ym1R) but I just can't get any gesture events to come into the event() function.
When I ask Google for help I just get examples of people trying to do this outside QML with a standard C++ QGraphicView based app.
I wonder if QML is somehow blocking gestures?
Thanks,
Paul Drummond -
I have it working on my application (works on Symbian and Harmattan):
I am not sure if I tried grabGesture on the QDeclarativeItem. That is how I have it working:
My QDeclarativeItem has a QGraphicsWidget child with:
@
setAttribute(Qt::WA_AcceptTouchEvents);
grabGesture(Qt::PinchGesture);
@and I installed an event filter on it so could process the events on my declarative item.
-
Hi, I have exactly the same problem: my QDeclarativeItem subclass doesn't receive any QGesture events.
Did you manage to solve your issue?@fcrochik: a QDeclarativeItem is a QGraphicsObject subclass, so in theory grabGesture() should work there as well. Why exacly did you call those methods from the child widget and not from the QDeclarativeItem itself?