У меня все работает:
Project {
...
readonly property stringList generalDefines: {
var defines = [];
defines.push("ORGANIZATION_NAME=\"" + project.productManufacturer + "\"");
defines.push("APPLICATION_NAME=\"" + project.productName + "\"");
defines.push("PRODUCT_VERSION=\"" + project.productVersion + (project.releaseType ? ("-" + project.releaseType) : ("")) + "\"");
...
defines.push("XXX_RSSI_SERVICE_UUID=\"2F5E50FF-DDD1-4412-ACEE-D11D923EEEEA\"");
...
return defines;
}
...
}
Application {
Depends { name: "cpp" }
...
cpp.defines: project.generalDefines
...
Export {
Depends { name: "cpp" }
cpp.defines: product.cpp.defines
}
}
C++ (Qt)
...
void MainDialog::setProductVersion()
{
ui->versionLabel->setText(PRODUCT_VERSION);
}
...
PS: Windows, MSVC2013