Important: Please read the Qt Code of Conduct -

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?


  • 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