Here is a complete listing of the example source file.
import QtQuick 2.0
import QtQuick.Controls 2.0
Item {
Switch {
id: element
x: 10
y: 10
text: qsTr("Switch")
id: coilItem
controller.device: client
controller.address: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
CheckBox {
id: checkBox
x: 10
y: 80
text: qsTr("Check Box")
id: coilItem1
controller.device: client
controller.address: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Label {
id: label
x: 227
y: 94
text: qsTr("Label")
id: holdingRegisterItem1
controller.device: client
controller.address: 10
delegateProperty: "text"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
SpinBox {
id: spinBox
x: 160
y: 10
id: holdingRegisterItem
controller.device: client
controller.address: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
}