diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-14 12:16:19 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-15 13:57:32 +0200 |
commit | 0c50edd6f5a819a7bc6e19c5ac69191d491167da (patch) | |
tree | 03372a0b067bad64a37444f2fe0c71c12e4f52fa /tests/auto/qml/qqmllanguage/data | |
parent | 662c3c3545275f412eb2cf7b9baef6003757d128 (diff) |
QQmlProperty: Allow QVariantList as QObject* container
This happens if we convert a JavaScript list to a variant.
Pick-to: 6.5 6.6
Fixes: QTBUG-114458
Change-Id: Iea206fd9dfd89f1512104431864b3294170bdbda
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/variantObjectList.qml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/variantObjectList.qml b/tests/auto/qml/qqmllanguage/data/variantObjectList.qml new file mode 100644 index 0000000000..9ec7d4f90f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/variantObjectList.qml @@ -0,0 +1,17 @@ +import QtQml +import People + +QtObject { + id: root + + property QtObject b: QtObject { id: g1; objectName: "Leo Hodges" } + property QtObject c: QtObject { id: g2; objectName: "Jack Smith" } + property QtObject d: QtObject { id: g3; objectName: "Anne Brown" } + + property Component pc: Component { + id: partyComp + BirthdayParty {} + } + + property BirthdayParty q: partyComp.createObject(root, { guests: [g1, g2, g3] }) +} |