diff options
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml')
-rw-r--r-- | tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml new file mode 100644 index 0000000000..923922c55a --- /dev/null +++ b/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml @@ -0,0 +1,42 @@ +import QtQuick 2.0 + +Rectangle { + id: root + + width: 800 + height: 600 + + property alias font: myText.font + + property int myPixelSize: 12 + property int myPixelSize2: 24 + + Text { + id: other + font.pixelSize: 6 + } + + Text { + id: myText + + text: "Hello world!" + font.pixelSize: myPixelSize + } + + states: State { + name: "Swapped" + PropertyChanges { + target: myText + font: other.font + } + } + + function toggle() { + if (root.state == "") root.state = "Swapped"; else root.state = ""; + } + + MouseArea { + anchors.fill: parent + onClicked: { if (root.state == "") root.state = "Swapped"; else root.state = "";} + } +} |