title: QString .arg function
body: <p>I am currently playing around with QStrings in QT and can't seem to understand why the following code is not working for me.</p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QDebug&gt;
  #include &lt;QString&gt;
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
      QString test;
  
      int x = 5;
  
      test.append("This is a test of the Arg Function %1").arg(x);
      qDebug() &lt;&lt; test;
      //should output This is a test of the Arg Function 5
      return a.exec();
  }
  </code></pre>
  
  <p>The output I am getting is:</p>
  
  <blockquote>
    <p>This is a test of the Arg Function %1</p>
  </blockquote>
  
  <p>Obviously I am expecting the value 5 to replace the %1, am I missing something obvious here?</p>