I'm trying to do something like this:

import qbs
Rule {
    property var myProperty: "test"
    ...

    outputArtifacts: {
        console.warn(myProperty);
    }
}

qbs can't find "myProperty" in the line trying to print it, saying
ReferenceError: Can't find variable: myProperty

I've tried setting an id to the Rule item and using that, doesn't work. How
can I access properties like this from within the Rule item? This does not
seem to work well in general in qbs, except when defining a property in a
"Product" item.

My use-case here is that in another Product I plan to do this:
import "myrule.qbs" as MyRule
...
MyRule { myProperty: "1" }
MyRule { myProperty: "2" }
MyRule { myProperty: "3" }
MyRule { myProperty: "etc" }

Cheers,
Ola
_______________________________________________
Qbs mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to