From 1347515da604cacc675023be6d6b472532814a70 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 2 Oct 2019 10:58:40 +0200 Subject: [PATCH] QmlDesigner: Fix ComboBox model issue This patch enables the ComboBox to properly show models which aren't raw arrays (e.g. a data model that has multiple named roles). Change-Id: I126f157e4da04afb768be40190c23720367b3419 Reviewed-by: Tim Jenssen --- .../imports/StudioControls/ComboBox.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml index ec0b93c4a08..2b73c2fac4d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml @@ -131,7 +131,7 @@ T.ComboBox { contentItem: Text { leftPadding: itemDelegateIconArea.width - text: modelData + text: myComboBox.textRole ? (Array.isArray(myComboBox.model) ? modelData[myComboBox.textRole] : model[myComboBox.textRole]) : modelData color: StudioTheme.Values.themeTextColor font: myComboBox.font elide: Text.ElideRight