title: Qt how to open a file in current dir ? or what's wrong with this?
body: <p>I'm trying to open an xml file in the current location of the executable   </p>
  
  <pre><code>        QString path = QDir::currentPath();
          path.append("/acc.xml");
          QFile file(path);
  
          if(!file.open(QIODevice::ReadOnly))
          {
              insertItem("IO ERR");
          }
  </code></pre>
  
  <ul>
  <li><p>When I run it from Qt creator, everything works. <code>currentPath()</code> returns the path to the executable's folder</p></li>
  <li><p>When I go to <code>project-build-desktop/</code> folder and try to run it manually <code>currentPath()</code> returns <code>/home/user/Documents</code></p></li>
  </ul>
  
  <p><strong>EDIT</strong></p>
  
  <p>also tried with same results:</p>
  
  <pre><code>Qt::current().path();
  Qt::current().absolutePath();
  </code></pre>