diff options
author | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2015-06-01 17:49:37 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-15 15:21:19 +0000 |
commit | 54eab024611c6b9675ef6d48a15e7d69ed28df87 (patch) | |
tree | faff31d691c3c0f66f0fc0261eac9afb96a4d20f /src/quick/items/qquickflickable.cpp | |
parent | 076640e0e7ac31574c41bd6298a89b0cb5d7f9a7 (diff) |
Introduce QQuickPointerHandler: base class for nested event handlers
They will be Tech Preview in 5.8, so they shouldn't be available
unless you explicitly import them.
Task-number: QTBUG-54824
Change-Id: I290854a4e2b76e2cdfef5c216c7fdeb47fbcd390
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickflickable.cpp')
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index dcba5c2d71..b4650a215a 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -44,6 +44,7 @@ #include "qquickwindow_p.h" #include "qquickevents_p_p.h" +#include <QtQuick/private/qquickpointerhandler_p.h> #include <QtQuick/private/qquicktransition_p.h> #include <private/qqmlglobal_p.h> @@ -1763,6 +1764,8 @@ void QQuickFlickablePrivate::data_append(QQmlListProperty<QObject> *prop, QObjec i->setParentItem(static_cast<QQuickFlickablePrivate*>(prop->data)->contentItem); } else { o->setParent(prop->object); // XXX todo - do we want this? + if (QQuickPointerHandler *pointerHandler = qmlobject_cast<QQuickPointerHandler *>(o)) + pointerHandler->setTarget(static_cast<QQuickItem *>(prop->object)); } } |