diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/readonlyListProperty.qml')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/readonlyListProperty.qml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/readonlyListProperty.qml b/tests/auto/qml/qmlcppcodegen/data/readonlyListProperty.qml new file mode 100644 index 0000000000..149638283b --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/readonlyListProperty.qml @@ -0,0 +1,17 @@ +import QtQml + +QtObject { + id: testObj + + // "readonly" means the identity of the list cannot be changed. + // Its contents can be changed. + readonly default property list<QtObject> theList + + Component.onCompleted: { + for (var i = 0; i < 4; i++) + testObj.theList.push(testObj) + } + + property int l: theList.length +} + |