Variable that refers to the project directory in Qt Creator?

后端 未结 4 1678
生来不讨喜
生来不讨喜 2021-02-07 22:16

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 occasi

4条回答
  •  执笔经年
    2021-02-07 22:33

    Since I struggled a bit to find it, I'm adding it here.

    In addition to %{sourceDir} and %{buildDir}, you could use %{CurrentDocument:Path}, %{CurrentDocument:FilePath} and %{CurrentProject:Path} to refer to specific files and folders in the project directory.

提交回复
热议问题