QMap in QML

Marco Martin notmart at gmail.com
Sat Jun 4 09:49:55 CEST 2011


On Friday 03 June 2011, Viranch Mehta wrote:
> Hi,
> 
> I have a combobox to which I need to add the items. The dataengine gives me
> a QMap<QString,QString>, from which I want to add the keys to the combobox.
> I'm not sure how well QML recognizes a QMap and lets me use QMap::keys()
> method.

try to do
for (item in map) {
     print(item)
     print(map[item])
}


-- 
Marco Martin


More information about the Plasma-devel mailing list