From eb39d857e9ba37b2fa53090791308aef2158687b Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Fri, 22 Sep 2017 15:00:55 +0200 Subject: [PATCH] CURA-4341 add documentation for Qt checkbox binding workaround --- resources/qml/Topbar.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index 24ffe4252e..23fd77511e 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -77,6 +77,8 @@ Rectangle exclusiveGroup: sidebarHeaderBarGroup style: UM.Theme.styles.topbar_header_tab + // We use a Qt.binding to re-bind the checkbox state after manually setting it + // https://stackoverflow.com/questions/38798450/qt-5-7-qml-why-are-my-checkbox-property-bindings-disappearing onClicked: { base.stopMonitoringPrint() checked = Qt.binding(isChecked) @@ -101,6 +103,8 @@ Rectangle exclusiveGroup: sidebarHeaderBarGroup style: UM.Theme.styles.topbar_header_tab_no_overlay + // We use a Qt.binding to re-bind the checkbox state after manually setting it + // https://stackoverflow.com/questions/38798450/qt-5-7-qml-why-are-my-checkbox-property-bindings-disappearing onClicked: { base.startMonitoringPrint() checked = Qt.binding(isChecked)