Incompatible type¶
[incompatible-type] An object, value, or expression is used on an incompatible type.
This warning category is spelled [incompatible-type] by qmllint.
Cannot assign to default property of incompatible type¶
What happened?¶
You assigned an object to a default property of an incompatible type.
Why is this bad?¶
The QML engine will not be able to assign the object at runtime.
Example¶
To fix this warning, bind a compatible type to the property or, if you are the author of the default property, change the type in the definition:
On-binding for property has wrong type¶
What happened?¶
You used an invalid property modifier type .
Why is this bad?¶
The QML engine will not be able to use the property modifier type at runtime.
Example¶
To fix this warning, remove the on or use a valid property modifier type :
Construction from string is deprecated; Use structured value type construction instead¶
What happened?¶
You constructed a QML_STRUCTURED_VALUE using a string.
Why is this bad?¶
This is deprecated and prone to typos.
Example¶
To fix this warning, populate the structured value type as explained in the QML_STRUCTURED_VALUE description instead of binding a string to the property:
Function without return type annotation returns¶
What happened?¶
You returned a value from a function without return type annotation.
Why is this bad?¶
You annotated the function to not return anything so the function should not return anything. The QML tooling will not be able to process the method and the QML engine will ignore the returned value in a future Qt version.
Example¶
To fix this warning, adapt the function signature to the new return type or remove the return value:
Cannot assign binding/object/literal¶
What happened?¶
You bound an object, literal, or expression to a property of an incompatible type.
Why is this bad?¶
The QML engine will not be able to assign the object, literal, or expression at runtime.
Example¶
To fix this warning, bind an object, value, or expression of a compatible type: