zui docs v0.0.5
GitHub ↗
Foundation and layout Container Native Qt

Fitted Box

Fitted Box is a native Zui container in the foundation and layout catalog, with 6 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
fitted_box width: 360, height: 180,
  fit: :contain, alignment: :center do
  label "Scale me", size: 42, bold: true
end
API

Component properties

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

widthWidth configuration for Fitted Box.property
heightHeight configuration for Fitted Box.property
fitFit configuration for Fitted Box.property
alignmentAlignment configuration for Fitted Box.property
clipClip configuration for Fitted Box.property
visibleVisible configuration for Fitted Box.property
Show 14 shared item properties
enabledopacityscalerotationzfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

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

clickNative event payload