Home · All Classes · All Functions · Overviews

QML XmlRole Element Reference

The XmlRole element allows you to specify a role for an XmlListModel. More...

Properties

Detailed Description


Property Documentation

isKey : bool

Defines whether this is a key role.

Key roles are used to to determine whether a set of values should be updated or added to the XML list model when XmlListModel::reload() is called.

See also XmlListModel.


name : string

The name for the role. This name is used to access the model data for this role from Qml.

 XmlRole { name: "title"; query: "title/string()" }

 ...

 Component {
     id: myDelegate
     Text { text: title }
 }

query : string

The relative XPath query for this role. The query should not start with a '/' (i.e. it must be relative).

 XmlRole { name: "title"; query: "title/string()" }


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.7.0