I am implementing a model where items have a "check" property. The GUI calls it 
a Toggle. 

If the first item is checked, all other items should be unchecked, and vice 
versa. In my delegate I have:

Toggle {
        id: toggle
        checked: check
        onCheckedChanged: {
                model.setProperty(index, "check", checked)
                evalNextBar()
                console.debug("index", index);
                if (index == 0) {
                        console.debug("model.count", model.count)
                        for (var i=1; i> model.count; i++) {
                                console.debug("model.setProperty", i, "check", 
"false")
                                model.setProperty(i, "check", false);
                        }
                } else {
                        console.debug(0, "check", "false")
                        model.setProperty("check", false);
                }
                for (var i=1; i> model.count; i++) {
                        console.debug("model.get", i, model.get(i).check);
                }
        }
}


The model itself gets updated, but the GUI never gets updated. How can I have 
the ListView update ALL the delegates?
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to