Here is a complete listing of the example source file
import QtQuick 2.11
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.1
id: root
property DiscreteInputController controller
property alias text: label.text
Label {
id: label
Layout.alignment:
Qt.AlignCenter
text: qsTr("Discrete input")
}
SpinBox {
id: addressSpinBox
Layout.alignment:
Qt.AlignCenter
value: controller.address
editable: true
onValueChanged: controller.address = value
}
Switch {
id: valueSpinBox
checked: controller.value
onCheckedChanged: controller.value = checked
BusyIndicator {
anchors.centerIn: parent
running: controller.busy
}
}
}
Definition: GridLayoutModel.qml:7