title: How do you port QUrl addQueryItem to Qt5's QUrlQuery?
body: <p>In <code>Qt</code> 4, the following code using <code>QUrl</code> works:</p>
  
  <pre><code>QUrl u;
  foreach (const settings::PostItem &amp; pi, settings.post)
      u.addQueryItem(pi.name, pi.value);
  postData = u.encodedQuery();
  </code></pre>
  
  <p><strong>NOTES</strong>: this code is from <a href="https://github.com/antialize/wkhtmltopdf/blob/master/src/lib/multipageloader.cc#L344">wkhtmltopdf</a> and <code>postData</code> is a QByteArray.</p>
  
  <p>However, <code>Qt</code> 5 does not have the <code>addQueryItem()</code> function anymore. How do you port this code?</p>