summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml
blob: 074851a67b89c0e5436048b6ad0f1fc285a43e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Qt.test 1.0

MyQmlContainer {
    property bool triggerDelete: false

    children: [
        MyQmlObject {
            // Will trigger deletion during binding evaluation
            stringProperty: {deleteMe(), "Hello"}
        },

        MyQmlObject {
            // Will trigger deletion during binding evaluation, but after component creation
            stringProperty: if (triggerDelete) { deleteMe(), "Hello" } else { "World" }
        }

    ]
}