title: QTextStream used for console output
body: <p>I'm facing this really annoying problem with QTextStream used for console output.</p>
  <pre><code>QTextStream cout(stdout, QIODevice::WriteOnly);
  cout.setRealNumberPrecision(1);
  cout.setPadChar('.');
  
  //  some code generating values of f[i] [...]
  
  for (int i = 10; i &gt;= 0; i--)
  {
      if (f[i] &lt; -0.04 || f[i] &gt; 0.04 || 1)
      {
         cout.setRealNumberNotation(QTextStream::FixedNotation);
         cout.setFieldAlignment(QTextStream::AlignRight);
         cout.setFieldWidth(8);
         cout &lt;&lt; f[i];
         cout.setFieldAlignment(QTextStream::AlignLeft);
         cout.setFieldWidth(3);
         cout &lt;&lt; &quot;*x^&quot;;
         cout.setFieldAlignment(QTextStream::AlignLeft);
         cout.setNumberFlags(cout.numberFlags() &amp; ~QTextStream::ForceSign);
         cout &lt;&lt; i &lt;&lt; endl;
      }
  }
  </code></pre>
  <p>The results look like this with
  the found polynomial is:</p>
  <pre><code>.....0.0*x^10.
  ......-0.0*x^9..
  .......0.0*x^8..
  ......-0.0*x^7..
  .......0.0*x^6..
  .......1.0*x^5..
  .....-36.0*x^4..
  .....397.0*x^3..
  ...-1674.0*x^2..
  ....2753.0*x^1..
  ...-1440.0*x^0..
  ..
  </code></pre>
  <p>I cannot get rid of this strange shift in the first line, and I don't know where <code>..</code> comes from. I think that there might be some problem with alignment flags, but have no idea what exactly may it is.</p>
  <p>Thanks for the help.</p>