mugi
28th August 2012, 02:29
Hi,
is there a way to get a list of keys of a QMap in the order they were inserted into the Map. I only need to retrieve the last inserted "key" and this code does not give me the wanted result because apparently QMap inserts the Items automatically in ascendant order.
QStringList list = map.keys();
if(list.size()>0)
wanted = list.last();
Is there a way to solve this without having to change the map?
thanks
is there a way to get a list of keys of a QMap in the order they were inserted into the Map. I only need to retrieve the last inserted "key" and this code does not give me the wanted result because apparently QMap inserts the Items automatically in ascendant order.
QStringList list = map.keys();
if(list.size()>0)
wanted = list.last();
Is there a way to solve this without having to change the map?
thanks