Switch QML Type
A switch. More...
Import Statement: | import QtQuick.Controls 1.2 |
Since: | Qt 5.2 |
Properties
- activeFocusOnPress : bool
- checked : bool
- exclusiveGroup : ExclusiveGroup
- style : Component
Detailed Description
A Switch is an option button that can be switched on (checked) or off (unchecked). Switches are typically used to represent features in an application that can be enabled or disabled without affecting others.
On mobile platforms, switches are commonly used to enable or disable features.
Column { Switch { checked: true } Switch { checked: false } }
You can create a custom appearance for a Switch by assigning a SwitchStyle.
Property Documentation
This property is true if the control takes the focus when it is pressed; forceActiveFocus() will be called on the control.
exclusiveGroup : ExclusiveGroup |
This property stores the ExclusiveGroup that the control belongs to.
The style Component for this control.
See also Qt Quick Controls Styles QML Types.