CheckBox QML Type
A check box control. More...
Import Statement: | import Qt.labs.controls 1.0 |
Inherits: |
Properties
- checkState : enumeration
- tristate : bool
Detailed Description
CheckBox presents an option button that can be toggled on (checked) or off (unchecked). Check boxes are typically used to select one or more options from a set of options.
A check box in its normal state. | |
A check box that is checked. | |
A check box that has active focus. | |
A check box that is disabled. |
ColumnLayout { CheckBox { checked: true text: qsTr("First") } CheckBox { text: qsTr("Second") } CheckBox { checked: true text: qsTr("Third") } }
Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.
See also Customizing CheckBox and Button Controls.
Property Documentation
checkState : enumeration
This property holds the check state of the checkbox.
Available states:
Constant | Description |
---|---|
Qt.Unchecked |
The checkbox is unchecked. |
Qt.PartiallyChecked |
The checkbox is partially checked. This state is only used when tristate is enabled. |
Qt.Checked |
The checkbox is checked. |
See also tristate and checked.
tristate : bool
This property holds whether the checkbox is a tri-state checkbox.
The default is false
, i.e., the checkbox has only two states.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/archives/qt-5.6/qml-qt-labs-controls-checkbox.html