aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlbinding/data/delayed.qml
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2016-03-01 21:14:48 -0600
committerMichael Brasser <michael.brasser@live.com>2016-04-08 17:12:53 +0000
commit1148d3acead3c13072876b873fb4ee9440921943 (patch)
tree8ad210b89a316a72b1b4bac309b2ad20420d7afc /tests/auto/qml/qqmlbinding/data/delayed.qml
parent49fdb74757e5d9eb9333c10f1b756eed119bbb67 (diff)
Add delayed property to Binding.
Provide a way to avoid potentially expensive or unexpected intermediate values. [ChangeLog][Binding] Add delayed property to Binding as a way to avoid potentially expensive or unexpected intermediate values. Change-Id: I6aaca570859cc1344eeb9c9f19f32660e8c0b4e0 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'tests/auto/qml/qqmlbinding/data/delayed.qml')
-rw-r--r--tests/auto/qml/qqmlbinding/data/delayed.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlbinding/data/delayed.qml b/tests/auto/qml/qqmlbinding/data/delayed.qml
new file mode 100644
index 0000000000..6f8281cc33
--- /dev/null
+++ b/tests/auto/qml/qqmlbinding/data/delayed.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.8
+
+Item {
+ width: 400
+ height: 400
+
+ property int changeCount: 0
+
+ property string text1
+ property string text2
+
+ function updateText() {
+ text1 = "Hello"
+ text2 = "World"
+ }
+
+ Text {
+ anchors.centerIn: parent
+ Binding on text {
+ value: text1 + " " + text2
+ delayed: true
+ }
+ onTextChanged: ++changeCount
+ }
+}
+