Make device type combobox work

This commit is contained in:
2023-02-15 22:45:18 +01:00
parent 895ac57046
commit 09d88ea75e
6 changed files with 122 additions and 121 deletions

View File

@@ -50,11 +50,13 @@ ColumnLayout {
}
Label { text: qsTr("DeviceType:") }
ComboBox {
id: deviceTypeCombobox
Layout.fillWidth: true
model: deviceTypesModel
textRole: "name"
valueRole: "id"
// TODO make binding for selection
currentIndex: deviceTypeCombobox.indexOfValue(listView.currentData.deviceTypeId)
onCurrentValueChanged: if (listView.currentData) listView.currentData.deviceTypeId = currentValue; else console.warn('discarded');
}
Label { text: qsTr("Address:") }
SpinBox {