title: Qt loop through QHash<QString,QString> to return it's key-value pairs
body: <p>I'm trying to loop through a QHash using foreach and get each pair in the QHash and then get the keys and values of those so I can append them to a string.</p>
  
  <p>Here's what I have</p>
  
  <pre><code>QString Packet::Serialize() {
      QString sBuilder = Command.toUpper() + " ";
  
      foreach(QMap&lt;QString,QString&gt; pair, Attributes) {
          sBuilder.append(pair); // i know this isn't right because I couldn't
                                 // finish the statement 
      }
  }
  </code></pre>
  
  <p>The variable <code>Attributes</code> is the QHash.</p>
  
  <p>Also, I realize the code is probably 100% wrong because I'm converting it from C#.</p>