[Interest] Putting a define with spaces in the .pro file?

Christian Kandeler christian.kandeler at theqtcompany.com
Fri Nov 13 10:58:25 CET 2015


On 11/13/2015 02:51 AM, Murphy, Sean wrote:
> But if I want my text to be a little more interesting and have spaces in it, it fails. Changing the DEFINES line in the .pro to:
>    DEFINES += MY_STRING=\\\"Hello You\\\"
> refuses to compile:

I think the semi-official algorithm for quoting in .pro files goes like 
this:
1. Add one pair of backslashes.
2. Try compiling.
3. In case of failure, add two more pairs of backslashes and go to 2.
4. Profit!


Christian



More information about the Interest mailing list