diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-11-23 14:46:06 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-11-24 12:12:32 +0000 |
commit | 29cf234ce28e4fcf26b60e906e1f4ae23eab5f54 (patch) | |
tree | 2f6be8c0335dcd86ec02c2f3fd98912237f175d2 /src/quick/handlers/qquickpointerhandler.cpp | |
parent | 7aa312be3ce7ff8f7f4b8e484747565c2cae88a7 (diff) |
QQuickPointerHandler: add read-only parent property
The parent is the Item in which the handler is instantiated.
It cannot (so far) be reassigned to a different item, so this is not
the same as QQuickItem's parent property: it's rather a convenience
to get the QObject parent and cast it.
Change-Id: Ib352213589532f45f104c8d83f04fd14107a4a20
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerhandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickpointerhandler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpointerhandler.cpp b/src/quick/handlers/qquickpointerhandler.cpp index 731de295e9..9f7b1c4cd0 100644 --- a/src/quick/handlers/qquickpointerhandler.cpp +++ b/src/quick/handlers/qquickpointerhandler.cpp @@ -162,4 +162,16 @@ void QQuickPointerHandler::handlePointerEventImpl(QQuickPointerEvent *event) m_currentEvent = event; } +/*! + \qmlproperty QQuickPointerHandler::parent + + The \l Item which is the scope of the handler; the Item in which it was declared. + The handler will handle events on behalf of this Item, which means a + pointer event is relevant if at least one of its event points occurs within + the Item's interior. Initially \l target() is the same, but target() + can be reassigned. + + \sa QQuickPointerHandler::target(), QObject::parent() +*/ + QT_END_NAMESPACE |