From 01038b82fb954801a51d10e53590a8a2c57c1eb1 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 29 Sep 2022 13:34:09 +0200 Subject: 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 (cherry picked from commit 7d09e80d53063983cc3dc4c57896095efaf70c31) Reviewed-by: Qt Cherry-pick Bot --- examples/demos/coffee/ApplicationFlowForm.ui.qml | 1 + examples/demos/coffee/imports/Coffee/Constants.qml | 1 + 2 files changed, 2 insertions(+) (limited to 'examples') diff --git a/examples/demos/coffee/ApplicationFlowForm.ui.qml b/examples/demos/coffee/ApplicationFlowForm.ui.qml index 8708ef093..a6889c897 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 3fbacadf0..ba24586c8 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 -- cgit v1.2.3