aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/data/goodAttachedProperty.qml
blob: 8472aabb10df5e1f06083ac662b725d313c3417d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import AttachedProperties 1.0
QtObject {
    TestType.object: Component {}
    TestType.count: 42 + 2
    Component.onCompleted: {
        TestType.count = 42;
        // TestType here is an attached type, not this object's instance of it.
        // This attached type has an unchanged property object of type QtObject,
        // so accessing Component's specific property 'progress' is only
        // possible with a cast to Component type
        console.log((TestType.object as Component).progress);
    }
}