blob: 7cfc9a39e01a2b66e1d16489a8b44fc484fb2453 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import QtQuick 2.0
Item {
property bool success: false
BaseComponent {
id: foo
property Text baz: Text { width: 200 }
}
// With contextual lookup, 'bar' is resolved in the BaseComponent context,
// and refers to the 'baz' defined there; in this context, however, 'baz'
// resolves to the override defined in 'foo'
Component.onCompleted: success = (foo.bar == 100) && (foo.baz.width == 200)
}
|