diff options
Diffstat (limited to 'doc/src/snippets/declarative/qtbinding/custompalette/main.qml')
| -rw-r--r-- | doc/src/snippets/declarative/qtbinding/custompalette/main.qml | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml new file mode 100644 index 0000000..f1a3b4f --- /dev/null +++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml @@ -0,0 +1,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] | 
