Switch QML Type
A switch. 更多...
Import Statement: | import QtQuick.Controls 1.4 |
开始支持版本: | Qt 5.2 |
基类: |
属性
- activeFocusOnPress : bool
- checked : bool
- exclusiveGroup : ExclusiveGroup
- pressed : bool
- style : Component
信号
- clicked()
详细描述
On and Off states of a Switch.
A Switch is a toggle 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.
属性
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.
This property is true
when the control is pressed.
This QML property was introduced in QtQuick.Controls 1.3.
style : Component |
The style Component for this control.
信号
This signal is emitted when the control is clicked.
This QML signal was introduced in QtQuick.Controls 1.3.