title: Writing text in QFile
body: <p>Is there any differences in two ways of writing text in <code>QFile</code>?</p>
  
  <p>By using <code>write</code> method:</p>
  
  <pre><code>QFile file("test.txt");
  if(file.open(QIODevice::WriteOnly | QIODevice::Text)) {
      file.write("My Text\n");
  }
  file.close();
  </code></pre>
  
  <p>Or by using <code>QTextStream</code>:</p>
  
  <pre><code>QFile file("test.txt")
  if(file.open(QIODevice::WriteOnly | QIODevice::Text)) {
       QTextStream out(&amp;file);
       out &lt;&lt; "My Text\n";
  }
  file.close()
  </code></pre>
  
  <p>Which way is preferred? Is there any differences in performance?</p>