[QBS] Get property from parent project

olivier musse olivier.musse at sfr.fr
Sat May 24 11:44:54 CEST 2014

> On 05/22/2014 04:19 PM, olivier musse wrote:
>> Property inheritance is really nice and simple. Thanks for this
>> important information.
>>     I have succeed to verify it, but then have another question : How can
>> I detect in the sub project if the property is already set at an higher
>> level project.
>> Project
>> {
>>        property string myprop:"val1"
>> Project{
>>            myprop: {here set to "val2" if not already existing}
>>        }
>> }
> This is not possible, due to how QML works. Your second line is a
> binding, which you can only use if a property was already declared. This
> information is static, and an error will be thrown if you use myprop on
> the left-hand side of a binding if no such property exists.
Ok I understand, but at least, suppose the property exists, can I check 
if is it empty and do something in this case.



More information about the Qbs mailing list