title: "QIODevice::write: device not open" when file is open
body: <p>When I compile my program I get the error message "QIODevice::write: device not open" this program worked on my old computer but for some reason its not working on my new computer. Any insight on how to fix this error would be greatly appreciated, thanks. </p>
  
  <pre><code>file.open(QIODevice::Append);
  file2.open(QIODevice::Append);
  
  QTextStream stream(&amp;file); //stream of information
  QTextStream stream2(&amp;file2);
  
  //write to file
  //code continued here, deleted to post here... stream &lt;&lt; whatever, stream2 &lt;&lt; whatever whatever...
  
  //end stream
  stream &lt;&lt; endl;
  stream2 &lt;&lt; endl;
  
  //close file
  file.close();
  file2.close();
  </code></pre>