Pascaldietz (Talk | contribs) (created ToggleButton API Snapshot page) |
Pascaldietz (Talk | contribs) (removed private properties) |
||
| Line 13: | Line 13: | ||
;''alias'' labelColorOff | ;''alias'' labelColorOff | ||
:Points to the color of the right label (off state) | :Points to the color of the right label (off state) | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
=Signals= | =Signals= | ||
Contents |
This is a button which let's the user switch between two options. The button can be toggled by a single click or by swiping in the desired direction.
ToggleButton {
id: onOffToggle
onLabel: qsTr("On")
offLabel: qsTr("Off")
anchors.centerIn: parent
onToggled: {
on ? console.log("Now I'm on") : console.log("Now I'm off")
}
}