title: c++ Error in Qt: has initializer but incomplete type
body: <pre><code>void FindWords::getTextFile() {
      QFile myFile(":/FindingWords2.txt");
      myFile.open(QIODevice::ReadOnly);
  
      QTextStream textStream(&amp;myFile);
      QString line = textStream.readAll();
      myFile.close();
  
      ui-&gt;textEdit-&gt;setPlainText(line);
      QTextCursor textCursor = ui-&gt;textEdit-&gt;textCursor();
      textCursor.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor, 1);
  }
  </code></pre>
  
  <p>The <code>QTextStream textStream(&amp;myFile)</code> keeps giving me the error and I can't fix it.</p>