aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickcombobox.cpp')
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index d987182c..00785598 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -202,6 +202,10 @@ QString QQuickComboBoxDelegateModel::stringValue(int index, const QString &role)
if (data.count() == 1 && role == QLatin1String("modelData"))
return data.first().toString();
return data.value(role).toString();
+ } else if (object.userType() == QMetaType::QObjectStar) {
+ const QObject *data = object.value<QObject *>();
+ if (data && role != QLatin1String("modelData"))
+ return data->property(role.toUtf8()).toString();
}
}
return QQmlDelegateModel::stringValue(index, role);