Currently Working Directory on Windows vs Mac OS X ...
tmason101 last edited by
On startup I would like to set my application's working directory to where the application's folder location is.
So, the following works great on Windows:
QApplication a(argc, argv);
w.setWindowTitle("Ready to Process");
QMessageBox::information(&w, QObject::tr("Current Directory"),
QObject::tr("Current working directory is: ") + QApplication::applicationDirPath(), QMessageBox::Ok );
However, when I run this on a Mac what happens is that the application's working directory is two levels deeper in the "Contents/MacOS" folder.
I would have to then do:
To get where the "application" is alongside all of the other files, etc.
Is there a better, cross-platform way to do what I want to do or is this the only way?