小编tut*_*s48的帖子

如何在其他QMap中迭代QMap

我寻找如何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 …

c++ qt qlist qmap c++14

-1
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1

c++14 ×1

qlist ×1

qmap ×1

qt ×1