我寻找如何QMap在其他中迭代 a QMap,例如:
QMap<int, QMap<int, QString>> map;
Run Code Online (Sandbox Code Playgroud)
以前我使用简单的 C++std::map和以下代码并且有效:
for(auto it = this->liste.begin(); it != this->liste.end(); it++) {
for(auto itr = it->second.begin(); itr != it->second.end(); itr++) {
//It works !!!!!
//qDebug() << "First : " << itr->first;
//qDebug() << "Second : " << itr->second;
//d.setPath(itr->second);
//qDebug() << "Path :" << itr->second << " Prefix :" << this->prefix << " Nb :" << itr->first;
process(d.absolutePath(), this->prefix, itr->first);
this->liste.clear();
}
}
Run Code Online (Sandbox Code Playgroud)
我的问题是我如何使用QMap而不是std::map为了在循环中使用 the …