title: QFile not reading file
body: <p>I am trying to read a simple text file using QFile (Qt5), but it strangely doesn't work. Below is my code.</p>
  
  <pre><code>QFile*file = new QFile("gh.txt");
  if(file-&gt;open(QIODevice::ReadOnly))
  {
      QByteArray array;
      array = file-&gt;readLine();
      qDebug() &lt;&lt; array;
  }
  file-&gt;close();
  </code></pre>
  
  <p>QDebug always gets an empty string.#</p>