Show icons in device type list

This commit is contained in:
Michael Ehrenreich committed 2023-02-23 00:34:31 +01:00
1 parent bbb3ccd0db
commit 97be6c6b6e
5 files changed
+19 -4

No files matched your search

+4 -2
View File
@@ -4,6 +4,7 @@ import QtQuick.Layouts
ColumnLayout {
property string textRole: "name"
property string iconSourceRole
property alias model: listView.model
property alias currentIndex: listView.currentIndex
@@ -13,6 +14,8 @@ ColumnLayout {
signal addClicked(index: int)
signal removeClicked(index: int)
id: editableListViewLayout
RowLayout {
Layout.fillWidth: true
@@ -97,8 +100,7 @@ ColumnLayout {
contentItem: IconChooserDelegateLayout {
anchors.fill: parent
text: model[textRole]
// TODO
//iconSource: comboBox.getIconUrl(index)
iconSource: (model && model[iconSourceRole]) ? model[iconSourceRole] : null
}
onClicked: listView.currentIndex = index
down: listView.currentIndex === index