gi, i have a question about qml and the XmlDataModel.
i have a xml file where i have something like this:
<model>
<item title="one" />
<item title="two" />
</model>
and i have a listView which has this data:
ListView {
id: listView
dataModel: XmlDataModel {
source: "data/model1.xml"
}
}
now i dant to add some data to this model when i e.g. press a button. how to make this?
XmlListModelis a read-only model by design. However, you can use it to conveniently fetch data and fill with that data aListModelwhich is mutable model. You can find an example here.