title: Iterating over a QMap with for
body: <p>I've a <code>QMap</code> object and I am trying to write its content to a file.</p>
  
  <pre><code>QMap&lt;QString, QString&gt; extensions;
  //.. 
  
  for(auto e : extensions)
  {
    fout &lt;&lt; e.first &lt;&lt; "," &lt;&lt; e.second &lt;&lt; '\n';
  }  
  </code></pre>
  
  <p>Why do I get: <code>error: 'class QString' has no member named 'first' nor 'second'</code></p>
  
  <p>Is <code>e</code> not of type <code>QPair</code>?</p>