aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickmousearea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickmousearea.cpp')
-rw-r--r--src/quick/items/qquickmousearea.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index bac52f04f8..2bb9158d51 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -483,6 +483,10 @@ qreal QQuickMouseArea::mouseY() const
\qmlproperty bool QtQuick::MouseArea::enabled
This property holds whether the item accepts mouse events.
+ \note Due to historical reasons, this property is not equivalent to
+ Item.enabled. It only affects mouse events, and its effect does not
+ propagate to child items.
+
By default, this property is true.
*/
bool QQuickMouseArea::isEnabled() const
@@ -719,7 +723,9 @@ void QQuickMouseArea::mouseMoveEvent(QMouseEvent *event)
|| QQuickWindowPrivate::dragOverThreshold(dragPos.y() - startPos.y(), Qt::YAxis, event, d->drag->threshold()))) {
setKeepMouseGrab(true);
d->stealMouse = true;
- d->startScene = event->windowPos();
+
+ if (d->drag->smoothed())
+ d->startScene = event->windowPos();
}
d->moved = true;
@@ -1246,6 +1252,10 @@ void QQuickMouseArea::setCursorShape(Qt::CursorShape shape)
start. By default this is bound to a platform dependent value. This property was added in
Qt Quick 2.2.
+ If \c drag.smoothed is \c true, the target will be moved only after the drag operation has
+ started. If set to \c false, the target will be moved straight to the current mouse position.
+ By default, this property is \c true. This property was added in Qt Quick 2.4
+
\snippet qml/mousearea/mouseareadragfilter.qml dragfilter
*/