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?
Forum Updated to NodeBB v4.3 + New Features

How to disable checkbox?

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 4.2k Views 2 Watching
  • 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 30 Mar 2015, 20:43 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 30 Mar 2015, 21:20 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

      1/2

      30 Mar 2015, 20:43

      • Login

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