aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-08-19 15:05:49 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2020-08-19 14:07:44 +0000
commite09ba596fd9f204a05d38da641f929ab214c8390 (patch)
treeb885882318d57ad0448818fba650d4235a503687
parent4c06abb87360205849b6abb243ecf58139b547b9 (diff)
QtQml: Fix ListProperty being read-only
This is due to QQmlListProperty<QObject> never getting registered as a metatype. Change-Id: I992fbd01514130973390bcfdf4dfcd0c7b07b59b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
index ebc549543..87d2437ba 100644
--- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
+++ b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
@@ -570,6 +570,9 @@ void PySide::initQmlSupport(PyObject *module)
return;
}
+ // Register QQmlListProperty metatype for use in QML
+ qRegisterMetaType<QQmlListProperty<QObject>>();
+
Py_INCREF(reinterpret_cast<PyObject *>(PropertyListTypeF()));
PyModule_AddObject(module, PepType_GetNameStr(PropertyListTypeF()),
reinterpret_cast<PyObject *>(PropertyListTypeF()));