summaryrefslogtreecommitdiff
path: root/examples/demos
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2022-09-29 13:34:09 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2022-09-30 09:55:25 +0000
commit7d09e80d53063983cc3dc4c57896095efaf70c31 (patch)
treeb23d0407bc83a4e8af19991e3e73690df52a35ab /examples/demos
parent105e1275fcd75941a030fb912f81b3310a1aca55 (diff)
downloadqtdoc-7d09e80d53063983cc3dc4c57896095efaf70c31.tar.gz
Fix Coffee machine demo
By using a constant/binding we avoid that the binding for the settings state is deleted as a side effect of having a Behavior. This fixes the demo, but not the underlying issue. Task-number: QTBUG-106677 Pick-to: 6.4 Change-Id: Ic4c5da9f159cb242fd4d3f039286bc0a3bdb803f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/demos')
-rw-r--r--examples/demos/coffee/ApplicationFlowForm.ui.qml1
-rw-r--r--examples/demos/coffee/imports/Coffee/Constants.qml1
2 files changed, 2 insertions, 0 deletions
diff --git a/examples/demos/coffee/ApplicationFlowForm.ui.qml b/examples/demos/coffee/ApplicationFlowForm.ui.qml
index 8708ef09..a6889c89 100644
--- a/examples/demos/coffee/ApplicationFlowForm.ui.qml
+++ b/examples/demos/coffee/ApplicationFlowForm.ui.qml
@@ -41,6 +41,7 @@ Rectangle {
PropertyChanges {
target: choosingCoffee
selected: true
+ x: Constants.defaultX
}
},
State {
diff --git a/examples/demos/coffee/imports/Coffee/Constants.qml b/examples/demos/coffee/imports/Coffee/Constants.qml
index 3fbacadf..ba24586c 100644
--- a/examples/demos/coffee/imports/Coffee/Constants.qml
+++ b/examples/demos/coffee/imports/Coffee/Constants.qml
@@ -15,6 +15,7 @@ QtObject {
readonly property int width: 1024
readonly property int height: 768
readonly property int leftSideBarWidth: 366
+ readonly property int defaultX: 0
readonly property color backgroundColor: "#443224"
readonly property int defaultMargin: 8