-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
5595ad768309b27c2c20376105f8715082b616bf
This code
Rectangle {
width: 480; height: 800
Item { id: item }
Timer { interval: 1000; running: true;
onTriggered: print("item's parent: " + item.parent.toString() +
"\ntimer's parent: "+ parent.toString()); }
}
prints
item's parent: QDeclarativeRectangle(0x8c9b4e8)
timer's parent: null
Changing the code to
Rectangle {
width: 480; height: 800
Item { id: item }
Timer { id: timer; interval: 1000; running: true;
onTriggered: print("item's parent: " + item.parent.toString() +
"\ntimer's parent: "+ timer.parent.toString()); }
}
prints
TypeError: Result of expression 'timer.parent' [undefined] is not an object.