QT Creator Release location
I am trying to build a function into a program to open a file in the same folder. When I build the program from within the IDE does it open the file in the release folder in the "*-desktop-build/release" folder?
So basically if I drop a index.txt file into that release folder and then build the program in QT creator, will that relative address work?
Re: QT Creator Release location
You can use the static functions QDir::currentPath() and QDir::setCurrent() to do what you want.
Re: QT Creator Release location
Or QCoreApplication::applicationDirPath() if you must always find the file relative to the application executable file regardless of what the current working directory is (there's a small chance this will fail though, see the docs). Another option is to include the file in the application resources and then you can always find it.