zui docs v0.0.5
GitHub ↗
Navigation and structure Native Qt

List View

A streamlined native collection view with keys, labels, descriptions, icons, and activation.

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
list_view([{ id: 1, name: "Overview", icon: :house }, { id: 2, name: "Settings", icon: :gear }], key_field: :id, label_field: :name, icon_field: :icon, selected: 1) { |item| puts "Opened: #{item.fetch("name")}" }
API

Component properties

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

itemsItems configuration for List View.property
key_fieldKey field configuration for List View.property
label_fieldLabel field configuration for List View.property
description_fieldDescription field configuration for List View.property
icon_fieldIcon field configuration for List View.property
selectedSelected configuration for List View.property
orientationOrientation configuration for List View.property
spacingSpacing configuration for List View.property
widthWidth configuration for List View.property
heightHeight configuration for List View.property
empty_textEmpty text configuration for List View.property
visibleVisible configuration for List View.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.

activateNative event payload
changeNative event payload
scrollNative event payload