BooleanControl QML Type
A toggle switch control for editing boolean properties. More...
| Import Statement: | import QtInterfaceFramework.ControlPanelHelper 1.0 |
| Inherits: |
Properties
- checked : bool
Signals
- toggled(bool checked)
Detailed Description
BooleanControl provides a styled Switch with an accompanying status label that displays "Enabled" or "Disabled" based on the current state. It is used by the simulation control panel for all boolean-typed properties.
Usage
BooleanControl {
checked: backend.headlightsOn
onToggled: function(checked) {
backend.setHeadlightsOn(checked)
}
}Property Documentation
checked : bool
This property holds whether the switch is checked.
By default, the property is set to false.
Signal Documentation
toggled(bool checked)
This signal is emitted when the user toggles the switch. The checked parameter contains the new state.
Note: The corresponding handler is onToggled.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.