mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
combobox: add textRole to silence QVariantMap-to-QString warnings
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user