jeudi 12 octobre 2023

CheckBox error "Cannot assign to non-existent property"

I use a CheckBox in the qml code below (qt version 6.5.2):

CheckBox
{
    id: floorCheckbox
    anchors.left: parent.left
    anchors.horizontalCenter: parent.horizontalCenter
    visible: EquipmentObject.linkFloatNotRequired
    indicator: Rectangle
    {
        implicitWidth: 26
        implicitHeight: 26
        radius: 5
        border.color: floorCheckbox.checked ? CommonStyles.fillNovosTeal : "gray"
        border.width: 2
        color: floorCheckbox.checked ? CommonStyles.fillNovosTeal : "white"
        Text
        {
            id: checkMark
            anchors.centerIn: parent
            font.family: CommonStyles.fontAwesome.family
            font.pixelSize: 20 * root.zoom
            text: FontIconModel.value( "fa-check" )
            color: "white"
        }
    }
}

I got an error which says:

Cannot assign to non-existent property "indicator"

I also have the same problem with checked attribute, implicitIndicatorHeight attribute, etc...

It seems that Checkbox cannot access the members that inherit from AbstractButton class.




Aucun commentaire:

Enregistrer un commentaire