summaryrefslogtreecommitdiff
path: root/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml
blob: b90e57ef554f4f45af8e5a2c1e96c6b9c577bdc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import Qt 4.6

XmlListModel {
    query: "/data/item"
    XmlRole { id: nameRole; name: "name"; query: "name/string()"; isKey: true }
    XmlRole { name: "age"; query: "age/number()"; isKey: true }
    XmlRole { name: "sport"; query: "sport/string()" }

    function disableNameKey() {
        nameRole.isKey = false;
    }
}