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
|
||||
|
||||
property string colorKey
|
||||
property alias dropProxy: dragTarget
|
||||
|
||||
width: 64; height: 64
|
||||
keys: [ colorKey ]
|
||||
|
@ -17,16 +16,7 @@ DropArea {
|
|||
id: dropRectangle
|
||||
|
||||
anchors.fill: parent
|
||||
color: dragTarget.colorKey
|
||||
|
||||
states: [
|
||||
State {
|
||||
when: dragTarget.containsDrag
|
||||
PropertyChanges {
|
||||
dropRectangle.color: "grey"
|
||||
}
|
||||
}
|
||||
]
|
||||
color: dragTarget.containsDrag ? "grey" : dragTarget.colorKey
|
||||
}
|
||||
}
|
||||
//! [0]
|
||||
|
|
Loading…
Reference in New Issue