Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to disable checkbox?
QtWS25 Last Chance

How to disable checkbox?

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zword
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      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
      }
      
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved