Extract all QtQuick 1 elements into a separate library/plugin.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeecmascript / data / listProperties.qml
1 import Qt.test 1.0
2 import QtQuick 2.0
3
4 MyQmlObject {
5     id: root
6
7     objectListProperty: [
8         QtObject { property int a: 10 },
9         QtObject { property int a: 11 }
10     ]
11
12     function calcTest1() {
13         var rv = 0;
14         for (var ii = 0; ii < root.objectListProperty.length; ++ii) {
15             rv += root.objectListProperty[ii].a;
16         }
17         return rv;
18     }
19
20     property int test1: calcTest1();
21     property int test2: root.objectListProperty.length
22     property bool test3: root.objectListProperty[1] != undefined
23     property bool test4: root.objectListProperty[100] == undefined
24 }