Details
-
User Story
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
None
-
4
-
QDS Berlin - 2023 Week 17/18, QDS Berlin - 2023 Week 19/20
Description
QML example
import QtQuick 6.5 import QtQuick.Controls 6.5 import UntitledProject151 import QtQuick.Studio.LogicHelper import QtQuick.Studio.Components Rectangle { id: rectangle width: Constants.width height: Constants.height color: Constants.backgroundColor @Annotate { property int x: 5 } ArcItem { id: arc x: 956 y: 404 end: rangeMapper.output begin: -90 fillColor: "#00000000" RangeMapper { id: rangeMapper outputMinimum: 0 input: spinBox.value inputMaximum: 100 outputMaximum: 180 } MinMaxMapper { id: minMaxMapper maximum: 60 minimum: 0 input: spinBox.value } } SpinBox { id: spinBox x: 588 y: 551 value: 50 stepSize: 1 to: 100 } StateGroup { id: arcColorSateGroup states: [ State { name: "inRange" when: !minMaxMapper.outOfRange PropertyChanges { target: arc strokeColor: "#1eb641" } }, State { name: "outOfRange" when: minMaxMapper.outOfRange PropertyChanges { target: arc strokeColor: "#c21414" } PropertyChanges { target: button text: qsTr("Reset") } } ] } Button { id: button x: 588 y: 410 text: qsTr("Reset") Connections { target: button onClicked: spinBox.value = 50 //Assigment should be handled my node -> assigment.execute()/trigger() } /* Assignment { id: assignment target: spinBox property: "value" value: 50 } */ } }