diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-01 22:27:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-01 22:27:26 +0200 |
commit | ead7aea128d81118886721585058b45f037f5613 (patch) | |
tree | d04f8bce4221d7aa40b6e4ef64a28c193a12fa07 /src/quick/items/qquickitem.cpp | |
parent | 7e742bff27491b5ecd8713540940683264c240a2 (diff) | |
parent | 5f4299eb597b89df20189a5c5a6235287e54b636 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/qml/jsruntime/qv4qobjectwrapper.cpp
Change-Id: I1a125b2334532ec5de4af39c0d6628890f4d0587
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 72edb5aeb8..2851d1a9e7 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -2703,8 +2703,6 @@ void QQuickItem::setParentItem(QQuickItem *parentItem) d->itemChange(ItemParentHasChanged, d->parentItem); - d->parentNotifier.notify(); - emit parentChanged(d->parentItem); if (isVisible() && d->parentItem) emit d->parentItem->visibleChildrenChanged(); @@ -7124,6 +7122,11 @@ void QQuickItem::unsetCursor() Grabs the mouse input. This item will receive all mouse events until ungrabMouse() is called. + Usually this function should not be called, since accepting for example + a mouse press event makes sure that the following events are delivered + to the item. + If an item wants to take over mouse events from the current receiver, + it needs to call this function. \warning This function should be used with caution. */ @@ -7138,6 +7141,12 @@ void QQuickItem::grabMouse() /*! Releases the mouse grab following a call to grabMouse(). + + Note that this function should only be called when the item wants + to stop handling further events. There is no need to call this function + after a release or cancel event since no future events will be received + in any case. No move or release events will be delivered after this + function was called. */ void QQuickItem::ungrabMouse() { @@ -7204,6 +7213,10 @@ void QQuickItem::grabTouchPoints(const QVector<int> &ids) /*! Ungrabs the touch points owned by this item. + \note there is hardly any reason to call this function. It should only be + called when an item does not want to receive any further events, so no + move or release events will be delivered after calling this function. + \sa grabTouchPoints() */ void QQuickItem::ungrabTouchPoints() |