Duplicate bindings¶
[duplicate-property-binding] A property was bound multiple times.
This warning category is spelled [duplicate-property-binding] by qmllint.
Duplicate interceptor on property¶
What happened?¶
One property has multiple interceptors .
Why is this bad?¶
Setting multiple interceptors on the same property is unsupported by the QML engine.
Example¶
Lets use Behavior as interceptor twice on the same property:
To fix this warning, remove all but one Behavior:
See also Property Modifier Types .
Duplicate value source on property¶
What happened?¶
One property has multiple value sources .
Why is this bad?¶
The value sources will show unexpected behavior when combined. See example below.
Example¶
Lets use NumberAnimation as value source twice on the same property:
If you check the output of that program, you will see that the two NumberAnimation will interleave each other, which is probably not the effect that was intended. To fix this warning, remove all but one NumberAnimation:
Cannot combine value source and binding¶
What happened?¶
One property has a value source and a binding on the same property.
Why is this bad?¶
The binding will updated the property value before the value source starts updating this property. This may lead to unexpected behavior, and is also harder to read.
Example¶
Lets use NumberAnimation as value source on the same property:
If you check the output of that program, you will see that the NumberAnimation will animate from 55 to 50, which would be easier to read with following code: