title: Qt QFile / QTemporaryFile cannot read or write
body: <p>I have no idea why, but i can´t get the simplest example of QTemporaryFile to run... My real intent is to write data from QAudioInput into a temporary file before it is processed later.</p>
  
  <p>After trying several times I realized that neither .read(), .readLine(), .readAll() or .write() would have any effect... The error string is always "Unknown Error" and it neither works for QFile or QTemporaryFile. </p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QTemporaryFile&gt;
  #include &lt;QDebug&gt;
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
      QTemporaryFile tf;
      tf.open();
      tf.write("Test");
      QTextStream in(&amp;tf);
      qDebug() &lt;&lt; "Testprogramm";
      qDebug() &lt;&lt; tf.isOpen();
      qDebug() &lt;&lt; tf.errorString();
      qDebug() &lt;&lt; in.readLine();
      qDebug() &lt;&lt; tf.readAll();
      tf.close();
      return a.exec();
  } 
  </code></pre>
  
  <p>The debug posts:</p>
  
  <blockquote>
  <pre><code>Testprogramm
  true
  "Unknown error"
  ""
  ""
  </code></pre>
  </blockquote>
  
  <p>Thank you in advance! </p>