DropArea QML Type
For specifying drag and drop handling in an area. More...
Properties
- containsDrag : bool
- drag
- drag.source : QtObject
- keys : stringlist
Signals
- dropped(DragEvent drop)
- entered(DragEvent drag)
- exited()
- positionChanged(DragEvent drag)
Detailed Description
\inherits
Item \inqmlmodule
QtQuick \ingroup
qtquick-input
A DropArea is an invisible item which receives events when other items are dragged over it.
The Drag attached property can be used to notify the DropArea when an Item is dragged over it.
The keys property can be used to filter drag events which don't include a matching key.
The drag.source property is communicated to the source of a drag event as the recipient of a drop on the drag target.
See also Qt Quick Examples - Drag and Drop.
Property Documentation
[read-only] containsDrag : bool |
This property identifies whether the DropArea currently contains any dragged items.
drag group |
---|
[read-only] drag.x : qreal |
[read-only] drag.y : qreal |
These properties hold the coordinates of the last drag event.
[read-only] drag.source : QtObject |
This property holds the source of a drag.
keys : stringlist |
Signal Documentation
dropped(DragEvent drop) |
This signal is emitted when a drop event occurs within the bounds of a DropArea.
Note: The corresponding handler is onDropped
.
entered(DragEvent drag) |
This signal is emitted when a drag enters the bounds of a DropArea.
Note: The corresponding handler is onEntered
.
exited() |
This signal is emitted when a drag exits the bounds of a DropArea.
Note: The corresponding handler is onExited
.
positionChanged(DragEvent drag) |
This signal is emitted when the position of a drag has changed.
Note: The corresponding handler is onPositionChanged
.