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

'this' pointer in QML

$
0
0
I think it doesn’t have ‘this’ (any kind of), you can look for youself [qt.gitorious.org]. I’d suggest using ‘id’ property. Item {   Row {     Repeater {       Button {           id: myButton // now identifiable           onClicked: {             setColor(myButton) // use id           }       }     }   }   function setColor(o) {      o.color = "red";   } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles