QML have parent for referencing parent element, but does it have this for referencing this element?
For example (Button is an imaginary element that has ‘clicked’ signal and ‘color’ property):
Item {
Row {
Repeater {
Button {
onClicked: {
setColor(this)
}
}
}
}
function setColor(o) {
o.color = "red";
}
}
↧