Le 2013/10/30 à 11:06, Nicolás Alvarez <nicolas.alva...@gmail.com> a écrit :
> 2013/10/29 Calogero Mauceri <mauc...@actgate.com>: >>> ... >> >> >> The Qt documentation states that QDir::currentPath() returns "The >> application working directory". Shouldn't the workind directory be >> initialized with the path the application was launched from? If that's >> not the case, which is the right way to obtain the working directory? > > That is the correct way to get the working directory. But there is no > documentation from Apple guaranteeing what the working directory will > be when Finder launches an application. Calogero, I don't think "working" directory means exactly what you think it means. Also, as Nicolás says, "the path the application was launched from" means whatever the Finder wants it to be. Looks like you want something like CFBundleCopyBundleURL(CFBundleGetMainBundle()) . For Qt, I'd say QApplication::applicationDirPath() + ../../.. or Qt5's QStandardPaths::ApplicationsLocation are your best bets. Sandy. _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development