[Qt-qml] Set custom property in onChildrenChanged?

Charley Bay charleyb123 at gmail.com
Sat Oct 30 19:21:23 CEST 2010


Ooops, typo (on parent name), that inserted code to inspect
each property within a child (more complete example with
pre-pended index) should be:

Item {
  id:  myParent

  onChildrenChanged: {
      for(var i = 0; i < myParent.children.length; ++i) {
        console.log("--------------");
        for (var myKey in myParent.children[i]) {
           console.log("(" + i + ")child[" + myKey + "] == (" +
myParent.children[i][myKey] + ")");
        }
      }
   }
}

Sorry about that.  ;-))

--charley



More information about the Qt-qml mailing list