zui docs v0.0.5
GitHub ↗
Data and collections Native Qt

Switch Delegate

Switch Delegate is a native Zui component in the data and collections catalog, with 35 component-specific properties.

Usage

Ruby example

Paste this complete Builder example inside the app surface from the Quickstart. Replace illustrative asset paths with files from your project.

Ruby
switch_delegate "Auto deploy", value: :auto_deploy, checked: false, description: "Deploy when checks pass"
API

Component properties

35 component-specific values, plus shared item and layout properties.

textText configuration for Switch Delegate.property
descriptionDescription configuration for Switch Delegate.property
valueValue configuration for Switch Delegate.property
checkedChecked configuration for Switch Delegate.property
selectedSelected configuration for Switch Delegate.property
highlightedHighlighted configuration for Switch Delegate.property
enabledEnabled configuration for Switch Delegate.property
widthWidth configuration for Switch Delegate.property
heightHeight configuration for Switch Delegate.property
paddingPadding configuration for Switch Delegate.property
spacingSpacing configuration for Switch Delegate.property
indicator_widthIndicator width configuration for Switch Delegate.property
indicator_heightIndicator height configuration for Switch Delegate.property
thumb_sizeThumb size configuration for Switch Delegate.property
animatedAnimated configuration for Switch Delegate.property
durationDuration configuration for Switch Delegate.property
backgroundBackground configuration for Switch Delegate.property
selected_backgroundSelected background configuration for Switch Delegate.property
highlighted_backgroundHighlighted background configuration for Switch Delegate.property
foregroundForeground configuration for Switch Delegate.property
selected_foregroundSelected foreground configuration for Switch Delegate.property
mutedMuted configuration for Switch Delegate.property
accentAccent configuration for Switch Delegate.property
track_colorTrack color configuration for Switch Delegate.property
checked_track_colorChecked track color configuration for Switch Delegate.property
thumb_colorThumb color configuration for Switch Delegate.property
checked_thumb_colorChecked thumb color configuration for Switch Delegate.property
border_colorBorder color configuration for Switch Delegate.property
border_widthBorder width configuration for Switch Delegate.property
radiusRadius configuration for Switch Delegate.property
font_familyFont family configuration for Switch Delegate.property
font_sizeFont size configuration for Switch Delegate.property
description_sizeDescription size configuration for Switch Delegate.property
accessible_nameAccessible name configuration for Switch Delegate.property
visibleVisible configuration for Switch Delegate.property
Show 13 shared item properties
opacityscalerotationzfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

Subscribe with on widget, :event and keep behavior in Ruby.

activateNative event payload
clickNative event payload
changeNative event payload
toggleNative event payload
pressNative event payload
releaseNative event payload
hoverNative event payload
focusNative event payload
blurNative event payload
showNative event payload
hideNative event payload