Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

'this' pointer in QML

$
0
0
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";   } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles