combobox: add textRole to silence QVariantMap-to-QString warnings

This commit is contained in:
Lemmy
2026-03-04 10:15:23 -05:00
parent 4163fc7632
commit fbbf419b34
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -140,6 +140,7 @@ RowLayout {
Layout.preferredHeight: Math.round(root.preferredHeight * Style.uiScaleRatio)
implicitWidth: Layout.minimumWidth
model: root.model
textRole: "name"
currentIndex: root.findIndexByKey(root.currentKey)
onActivated: {
+1
View File
@@ -172,6 +172,7 @@ RowLayout {
Layout.preferredHeight: Math.round(root.preferredHeight * Style.uiScaleRatio)
implicitWidth: Layout.minimumWidth
model: root.activeModel
textRole: "name"
currentIndex: findIndexInActiveModel(currentKey)
onActivated: {
if (combo.currentIndex >= 0 && root.activeModel && combo.currentIndex < root.activeModel.count) {