Simplify dragNDrop example and remove unneeded alias
Change-Id: Ia0e5d5dc46a60b6d88864b3250f8cf91b03b897f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 03b75a0baa
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
27590dbfe8
commit
fbc889e677
|
@ -8,7 +8,6 @@ DropArea {
|
||||||
id: dragTarget
|
id: dragTarget
|
||||||
|
|
||||||
property string colorKey
|
property string colorKey
|
||||||
property alias dropProxy: dragTarget
|
|
||||||
|
|
||||||
width: 64; height: 64
|
width: 64; height: 64
|
||||||
keys: [ colorKey ]
|
keys: [ colorKey ]
|
||||||
|
@ -17,16 +16,7 @@ DropArea {
|
||||||
id: dropRectangle
|
id: dropRectangle
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: dragTarget.colorKey
|
color: dragTarget.containsDrag ? "grey" : dragTarget.colorKey
|
||||||
|
|
||||||
states: [
|
|
||||||
State {
|
|
||||||
when: dragTarget.containsDrag
|
|
||||||
PropertyChanges {
|
|
||||||
dropRectangle.color: "grey"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//! [0]
|
//! [0]
|
||||||
|
|
Loading…
Reference in New Issue