I have a nested QMap QMap <QString, QMap<QString, QVariant> > map
and a temporary QMap QMap <QString, QVariant> tmpMap
I need to fill the temporary QMap with the inner QMap's keys and values so I can
loop through and output all the values of the nested QMap.
This is currently my code
QMap <QString, QMap<QString, QVariant> > map;
QMap <QString, QVariant> tmpMap;
QList<QString> mapKeys = map.keys();
for(int index = 0; index < mapKeys.size(); ++index)
{
tmpMap.unite(map.value(QString(index)));
QList<QString> tmpMapKeys = tmpMap.keys()
for(int index2 = 0, index2 < tmpMapKeys.size(); ++index2)
{
//Stuff to check and output
}
}
However, the second for loop never runs since the tmpMap never stores anything.