I\'m trying to open an xml file in the current location of the executable
QString path = QDir::currentPath();
path.append(\"/acc.xml\");
Check the returned value of QDir::currentPath()
. I think when you run from Qt Creator, it returns the path where the project file (*.pro) is located. When you run from outside, you get path of the binary.
Edit
I never worked with Linux. However, you can try other functions/combinations from QDir
:
etc.