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

MyQmlContainer {
    property bool triggerDelete: false

    children: [
        MyQmlObject {
            // Will trigger deletion on binding assignment
            deleteOnSet: Math.max(0, 1)
        },

        MyQmlObject {
            // Will trigger deletion on binding assignment, but after component creation
            deleteOnSet: if (triggerDelete) 1; else 0; 
        }
    ]
}