How to define a reusable folder path in Qt project file?
-
When working with a Qt project file *.pro one can use for example the $$PWD to reference to the folder containing the project file.
Is there a possible way to define a custom folder path?
Like saying: $$CUSTOMFOLDER = /home/user/folder
I would like to define CUSTOMFOLDER once and then reuse it in the project file so that I dont always have to paste the long folder path. By That the code would also become more readable.
-
@OlePeterman said in How to define a reusable folder path in Qt project file?:
CUSTOMFOLDER = /home/user/folder
on LInux
export CUSTOMFOLDER = /home/user/folder
and save it in your .bashrc file -
@JoeCFD appreciate your help
Simply writing - like defining - in project file:
CUSTOMFOLDER = /home/user/folderand the reusing that variable by:
$$CUSTOMFOLDERreturns the path reference.