Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Trusted Contributor
Posts: 114
Registered: ‎05-09-2013
My Device: BB10 Z10
My Carrier: Virgin

Re: Correlation of QVariantList and QList<QVariantMap>

[ Edited ]

Ah... which then brings me full circle to my original post Smiley Happy

 

Seem strange that reading the data from an XML into a data model is so straight forward, but then saving that same data back into XML needs such a cumbersome approach...

 

While I can make this work using iteration, I will leave the post open, in case someone has a more elegant solution. In case it helps anyone, the iterator code for the above is:

 

	QList<QVariantMap> myList =  m_dataModel->toListOfMaps();
	QVariantList membersList;
	foreach(QVariantMap s, myList){
		membersList << s;
	}