How to disable checkbox?



  • Is there any analogue to Qt's setEnabled() in QML ?

    I mean control(checkbox in my case) must be disabled and has inactive("grey") color.
    Disable part is ok: it is an enable property but how to change its color to inactive?

    Thanx



  • Hi,
    I don't understand what's the problem. Setting enabled to false automatically changes the color of the checkbox.

    CheckBox {
        text: "Hello"
        enabled: !checked
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.