diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-09-29 13:34:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-30 10:54:49 +0000 |
commit | 01038b82fb954801a51d10e53590a8a2c57c1eb1 (patch) | |
tree | b62d2ce94b935c23b660408e965d84ef5e2d10b4 | |
parent | f23fdd042480973e76dad8b03e84c12450d10ab2 (diff) | |
download | qtdoc-01038b82fb954801a51d10e53590a8a2c57c1eb1.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
Change-Id: Ic4c5da9f159cb242fd4d3f039286bc0a3bdb803f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7d09e80d53063983cc3dc4c57896095efaf70c31)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | examples/demos/coffee/ApplicationFlowForm.ui.qml | 1 | ||||
-rw-r--r-- | examples/demos/coffee/imports/Coffee/Constants.qml | 1 |
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 |