aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/dragtarget/tiles/DropTile.qml
blob: 9d968753db61a2a8e24559aaa99f3b8b44f73b48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import QtQuick 2.0

Rectangle {
    id: dropRectangle

    property string colorKey

    color: colorKey

    width: 100; height: 100

    DragTarget {
        id: dragTarget

        anchors.fill: parent

        keys: [ colorKey ]
        dropItem: dropRectangle
    }

    states: [
        State {
            when: dragTarget.containsDrag
            PropertyChanges {
                target: dropRectangle
                color: "grey"
            }
        }
    ]
}