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

Grid Layout

A native grid layout with explicit rows, columns, gaps, alignment, and layout constraints.

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
grid_layout columns: 3, column_spacing: 12, row_spacing: 12 do
  card { label "CPU" }
  card { label "Memory" }
  card { label "Network" }
end
API

Component properties

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

columnsColumns configuration for Grid Layout.property
rowsRows configuration for Grid Layout.property
spacingSpacing configuration for Grid Layout.property
row_spacingRow spacing configuration for Grid Layout.property
column_spacingColumn spacing configuration for Grid Layout.property
alignmentAlignment configuration for Grid Layout.property
visibleVisible configuration for Grid Layout.property
Show 16 shared item properties
enabledopacityscalerotationzwidthheightfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

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

clickNative event payload