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]