qmapiterator

QMap inheritance with QMapIterator

Hi, I made a personnal class which inherits QMap: class CfgMgr : public QMap<QString, CfgSet*> {...} I'm trying to iterate over all its elements like that: CfgMgr* m_pDefaults = new CfgMgr; // .../... QMapIterator<QString, CfgSet*> ics(*m_pDefaults); while (ics.hasNext()) { // doing my stuff } And I get the compile error: ...

QMapIterator declaration of several lists problem

i'm having 3 types of lists, and i'm trying to print them according to attribute_type. so according attribute_type the iterator is chosen. the problem is if for example attribute_type == "pis", the if condition is executed but when finished it returns to the upper decleration: QMapIterator it(pit.item_parameters), so this way the iterato...