Switch¶
Fluent styled Switch (WinUI ToggleSwitch OnContent / OffContent).
import QtQuick.Controls.QWinUI3 · src/style/QWinUI3/Switch.qml
Category: Styled controls · Library: v2.80
Gallery: Switch — src/gallery/pages/SwitchPage.qml
Example¶
Switch {
id: sw
text: qsTr("Wi‑Fi")
onContent: qsTr("On")
offContent: qsTr("Off")
onToggled: Theme.dark = sw.checked
}
Notes¶
Fluent Switch with WinUI OnContent/OffContent labels beside the track (plus Qt text as Header). Base API is Qt Quick Controls Switch.
API¶
Properties¶
| Name | Type | Description |
|---|---|---|
onContent |
string |
WinUI OnContent — label shown when checked (beside indicator) |
offContent |
string |
WinUI OffContent — label shown when unchecked |
header |
alias |
WinUI Header alias of text |
Signals¶
No custom signals (use inherited signals from the base type).
Methods¶
No custom methods (use inherited methods from the base type).
Generated from module sources by scripts/generate_component_docs.py — do not edit by hand.