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:
Thomas Zander 2022-10-15 11:52:10 +02:00 committed by Qt Cherry-pick Bot
parent 27590dbfe8
commit fbc889e677
1 changed files with 1 additions and 11 deletions

View File

@ -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]