title: Can not read text file with Qt 5
body: <p>I wrote a simple code to open plain text file with Qt 5's QFile as seen below;</p>
  
  <pre><code>// main.cpp
  #include &lt;iostream&gt;
  using std::endl;
  using std::cout;
  
  #include &lt;QCoreApplication&gt;
  #include &lt;QFile&gt;
  #include &lt;QIODevice&gt;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      QFile plainFile("plain.txt");
  
      if(plainFile.open(QIODevice::ReadOnly | QIODevice::Text))
      {
          cout &lt;&lt; "File opened successfull" &lt;&lt; endl;
          plainFile.close();
      }
      else{
          cout &lt;&lt; "could not open file." &lt;&lt; endl;
      }
      return a.exec();
  }
  </code></pre>
  
  <p>The output when compiled and run is "could not open file".
  What am I do wrong?</p>