title: How do iterate QMap in other QMap
body: <p>I look for on how to iterate a <code>QMap</code> in a other <code>QMap</code> like:</p>
  
  <pre><code>QMap&lt;int, QMap&lt;int, QString&gt;&gt; map;
  </code></pre>
  
  <p>Previously I used simple C++ <code>std::map</code> with the following code and that worked:</p>
  
  <pre><code>for(auto it = this-&gt;liste.begin(); it != this-&gt;liste.end(); it++) {
      for(auto itr = it-&gt;second.begin(); itr != it-&gt;second.end(); itr++) {
          //It works !!!!!
          //qDebug() &lt;&lt; "First : " &lt;&lt; itr-&gt;first;
          //qDebug() &lt;&lt; "Second : " &lt;&lt; itr-&gt;second;
  
          //d.setPath(itr-&gt;second);
  
          //qDebug() &lt;&lt; "Path :" &lt;&lt; itr-&gt;second &lt;&lt; " Prefix :" &lt;&lt; this-&gt;prefix &lt;&lt; " Nb :" &lt;&lt; itr-&gt;first;
          process(d.absolutePath(), this-&gt;prefix, itr-&gt;first);
  
          this-&gt;liste.clear();
      }
  }
  </code></pre>
  
  <p>My question is how I could use <code>QMap</code> instead of <code>std::map</code> in order to use the <code>QMap</code> in a <code>QTreeView</code> with a <code>foreach</code> loop (in particularly for the <code>QList</code> with the items).</p>
  
  <p>What is the replacement for <code>liste.first</code> and <code>liste.second</code>?</p>
  
  <p>Edit: </p>
  
  <pre><code>std::map&lt;int, std::map&lt;int, QString&gt;&gt; liste;
  </code></pre>
  
  <p>Thanks!</p>