summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
blob: f1a3b4f8c0e60e12b79ac5d874d0d2d1e01ff96e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//![0]
import Qt 4.7

Rectangle {
    width: 240
    height: 320
    color: palette.background
    
    Text {
        anchors.centerIn: parent
        color: palette.text
        text: "Click me to change color!"
    }
    
    MouseArea {
        anchors.fill: parent
        onClicked: {
            palette.text = "blue";
        }
    }
}
//![0]