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.
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.propertydescriptionDescription configuration for Switch Delegate.propertyvalueValue configuration for Switch Delegate.propertycheckedChecked configuration for Switch Delegate.propertyselectedSelected configuration for Switch Delegate.propertyhighlightedHighlighted configuration for Switch Delegate.propertyenabledEnabled configuration for Switch Delegate.propertywidthWidth configuration for Switch Delegate.propertyheightHeight configuration for Switch Delegate.propertypaddingPadding configuration for Switch Delegate.propertyspacingSpacing configuration for Switch Delegate.propertyindicator_widthIndicator width configuration for Switch Delegate.propertyindicator_heightIndicator height configuration for Switch Delegate.propertythumb_sizeThumb size configuration for Switch Delegate.propertyanimatedAnimated configuration for Switch Delegate.propertydurationDuration configuration for Switch Delegate.propertybackgroundBackground configuration for Switch Delegate.propertyselected_backgroundSelected background configuration for Switch Delegate.propertyhighlighted_backgroundHighlighted background configuration for Switch Delegate.propertyforegroundForeground configuration for Switch Delegate.propertyselected_foregroundSelected foreground configuration for Switch Delegate.propertymutedMuted configuration for Switch Delegate.propertyaccentAccent configuration for Switch Delegate.propertytrack_colorTrack color configuration for Switch Delegate.propertychecked_track_colorChecked track color configuration for Switch Delegate.propertythumb_colorThumb color configuration for Switch Delegate.propertychecked_thumb_colorChecked thumb color configuration for Switch Delegate.propertyborder_colorBorder color configuration for Switch Delegate.propertyborder_widthBorder width configuration for Switch Delegate.propertyradiusRadius configuration for Switch Delegate.propertyfont_familyFont family configuration for Switch Delegate.propertyfont_sizeFont size configuration for Switch Delegate.propertydescription_sizeDescription size configuration for Switch Delegate.propertyaccessible_nameAccessible name configuration for Switch Delegate.propertyvisibleVisible configuration for Switch Delegate.propertyShow 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