Variable that refers to the project directory in Qt Creator?

path, project, qt-creator, variables

Solution

The built-in _PRO_FILE_PWD_ variable contains the path to the directory containing the project file in use. That variable may be useful for you.

Problem

I'm working on a cross-platform Qt application and the paths are different on Mac OS X and Windows. Since the project is on an external hard-drive, the drive letter also occasionally changes on Windows. For that reason, I would like to refer to the project directory using a variable, preferably a built-in one. In particular, is there such a variable usable in: - The .pro file? - The build settings (in the Projects tab)?

Original source