Is there an elegant/easy way to get the application's base path on Mac OS, without the standard "MyApp.app/Contents/MacOS"? If possible I don't really want to make a specific condition for Mac OS.

I tried using QCoreApplication::applicationDirPath(), but it always includes this.

So I was thinking to try and remove it by making a QDir and using cdUp() 3 times.

Or just search for the 3rd '/' from the right and take the left string from there.