Hi,
I am having list of maps, want to store these maps in somewhere and access through iterator or something like that. how can we use this ?
Is it possible to creat a list (QList) of QMaps ? if NO, why ?
Hi,
I am having list of maps, want to store these maps in somewhere and access through iterator or something like that. how can we use this ?
Is it possible to creat a list (QList) of QMaps ? if NO, why ?
Yes, it's possible:
Qt Code:
QMap<Key, Type> map; QList< QMap<Key, Type> > list; list.append(map); // or typedef QMap<Key, Type> MyMap; MyMap map; QList<MyMap> list; list.append(map);To copy to clipboard, switch view to plain text mode
J-P Nurmi
frankiefrank (6th January 2011)
Hi...
I think you can use QList fo this .... here is code snap.
You can find an example in Qt assistant of Qt 4.1.0 search for QMap.
cheers
Bookmarks