[Qt-qml] XML item removal, update list

Alan Alpert alan.alpert at nokia.com
Mon May 24 16:57:35 CEST 2010


 Mandag 24. mai 2010 23:46:07 skrev Paasonen Jukka (Nokia-D/Helsinki) :
> Hello,
> 
> I am trying to achieve a ListView which is using XmlListModel as its model.
> Simply following the examples this is relatively easy to accomplish, as in
> the RSS example.
> 
> What I would like to add to this is the ability to remove and/or edit items
> in the source XML which are then reflected to the list. I understood that
> the "reload" method would be meant for updating the list, but how to edit
> the data in the XmlListModel? Is there an ability to access E4X in the
> XmlListModel?
> 

XmlListModel has no editing features (and no explicit E4X support, but if 
Javascript Core has E4X support we might have gotten it without noticing).

What I have done in a similar situation was to use XmlHttpRequest to send the 
edit actions to another program(which modified the source XML file directly) and 
then reload the XmlListModel.

-- 
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks



More information about the Qt-qml mailing list