diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-11-20 16:01:20 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-01-22 21:38:36 +0000 |
commit | 8380e4c4a4f3f49a74a8bc0ff330e1c9e14dbafc (patch) | |
tree | f7d19139cef728185a094d73f349be6a46e21997 /src/quick/items/qquickitem_p.h | |
parent | 84a1cac0baf2e089989ef1cba31437e7c3917d95 (diff) |
Add handlers declared as Flickable children to its contentItem
QQuickItemPrivate::data_append() was not invoked when any kind of
Pointer Handler was directly declared in a Flickable (or subclass)
because QQuickFlickable redefines the default property to be its own
flickableData property. So we need to repeat the special handling
in QQuickFlickablePrivate::data_append() too. The handler must
be added to the private->extra->pointerHandlers vector, so that
QQuickItemPrivate::handlePointerEvent() will attempt to deliver
events to those handlers.
TapHandler seems OK (especially with its default gesturePolicy
so that it does not do an exclusive grab).
PointHandler seems OK.
DragHandler competes with Flickable for the exclusive grab.
pressDelay can help; or set acceptedDevices: PointerDevice.Mouse
to allow the mouse to drag but not flick, and the touchscreen
to flick but not drag.
Fixes: QTBUG-71918
Fixes: QTBUG-73035
Change-Id: Icb97ed5230abe0cb6ec0230b5b5759a0528df7e8
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickitem_p.h')
-rw-r--r-- | src/quick/items/qquickitem_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 4ca3a01d02..771228914b 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -281,7 +281,7 @@ public: bool hasPointerHandlers() const; bool hasHoverHandlers() const; - void addPointerHandler(QQuickPointerHandler *h); + virtual void addPointerHandler(QQuickPointerHandler *h); // data property static void data_append(QQmlListProperty<QObject> *, QObject *); |