Debian Codegraph @

tests/auto/qml/qqmlproperty/data/nullPropertyBinding.qml

raw
1 import QtQuick 2.12
2
3 Item {
4 id: root
5
6 width: 640
7 height: 480
8
9 property bool toggle: false
10 property Item bound
11 property string message: "defined"
12
13 readonly property Item item: root.toggle ? root : null
14
15 Binding { target: root; property: "bound"; value: item}
16
17 function tog() {
18 console.info(root.bound ? root.bound.message: "undefined")
19 root.toggle = !root.toggle
20 return 42;
21 }
22 }