Extract all QtQuick 1 elements into a separate library/plugin.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeecmascript / data / scope.2.qml
1 import QtQuick 2.0
2
3 Item {
4     property int a: 0
5     property int b: 14
6
7     function b() { return 11; }
8     function c() { return 33; }
9
10     QtObject {
11         id: a
12         property int value: 19
13     }
14
15     QtObject {
16         id: c
17         property int value: 24
18     }
19
20     QtObject {
21         id: nested
22         property int a: 1
23         property int test: a.value
24         property int test2: b
25         property int test3: c.value
26     }
27
28
29     // id takes precedence over local, and root properties
30     property int test1: a.value 
31     property alias test2: nested.test
32
33     // properties takes precedence over local, and root methods
34     property int test3: b
35     property alias test4: nested.test2
36
37     // id takes precedence over methods
38     property int test5: c.value
39     property alias test6: nested.test3
40 }