Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.4.1, 6.5
Description
There are situations in which one wants to access a property of an Item, but you do not know its exact type or you want to use it for different types. For example, using qmllint on qtdeclarative/src/quickcontrols2/material/impl/CheckIndicator.qml yields:
Warning: qtdeclarative/src/quickcontrols2/material/impl/CheckIndicator.qml:19:38: Property "checkState" not found on type "QQuickItem" property int checkState: control.checkState ^^^^^^^^^^
Of course, since control is defined as:
property Item control
and Item does not have a property `checkState`.
However, both ButtonGroup and CheckBox have a property checkState.
If I want to use either of them in a property like this one - with silent qmlsc and no lint warnings - how would you do that?