aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickdrag.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2014-09-07 18:12:00 +0200
committerMitch Curtis <mitch.curtis@digia.com>2014-09-11 09:26:31 +0200
commitd723a28f0c6b0f9b031cc04eb509c11565f2244c (patch)
tree463c2918b1a4834e3403764408ea7955fb03dd5a /src/quick/items/qquickdrag.cpp
parent4a9650233e8c01048f4058ed32999daec96c77fd (diff)
Improve Drag documentation.
Change-Id: Ifba60b729c8ad02009cd5c8caa5d58e20a76c73b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/quick/items/qquickdrag.cpp')
-rw-r--r--src/quick/items/qquickdrag.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index adf4c678dc..5641c323ab 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -112,23 +112,23 @@ public:
\ingroup qtquick-input
\brief For specifying drag and drop events for moved Items
- Using the Drag attached property any Item can be made a source of drag and drop
+ Using the Drag attached property, any Item can be made a source of drag and drop
events within a scene.
- When a drag is \l active on an item any change in that item's position will
+ When a drag is \l active on an item, any change in that item's position will
generate a drag event that will be sent to any DropArea that intersects
with the new position of the item. Other items which implement drag and
drop event handlers can also receive these events.
The following snippet shows how an item can be dragged with a MouseArea.
- However, dragging is not limited to mouse drags, anything that can move an item
- can generate drag events, this can include touch events, animations and bindings.
+ However, dragging is not limited to mouse drags; anything that can move an item
+ can generate drag events, including touch events, animations and bindings.
\snippet qml/drag.qml 0
A drag can be terminated either by canceling it with Drag.cancel() or setting
Drag.active to false, or it can be terminated with a drop event by calling
- Drag.drop(). If the drop event is accepted Drag.drop() will return the
+ Drag.drop(). If the drop event is accepted, Drag.drop() will return the
\l {supportedActions}{drop action} chosen by the recipient of the event,
otherwise it will return Qt.IgnoreAction.
@@ -314,7 +314,8 @@ void QQuickDragAttached::setActive(bool active)
\qmlattachedproperty Object QtQuick::Drag::source
This property holds an object that is identified to recipients of drag events as
- the source of the events. By default this is the item Drag property is attached to.
+ the source of the events. By default this is the item that the Drag
+ property is attached to.
Changing the source while a drag is active will reset the sequence of drag events by
sending a drag leave event followed by a drag enter event with the new source.