[quote author="bootchk" date="1401976977"]It seems that argv[0] on a sandboxed app returns just the app name, not a path, e.g. 'myApp' instead of .../Contents/MacOS/myApp. So Paul's solution above doesn't work on a sandboxed app.[/quote]
What version of Qt? I am using 5.3 and I am getting the entire path from argv[0]. However, one interesting thing is that the line:
QDir dir(argv[0]);
Will initialize 'dir' with the appname as another folder. Hence, if argv is: /Applications/MyApp/Contents/MacOS/MyApp, QDir will treat that as a folder and you essentially have to cdUp 3 times.