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

Table View

Table View is a native Zui component in the data and collections catalog, with 44 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
rows = [
  { name: "Ada", role: "Engineer", status: "Online" },
  { name: "Grace", role: "Scientist", status: "Away" }
]
columns = [
  { key: :name, label: "Name", width: 180 },
  { key: :role, label: "Role", width: 220 },
  { key: :status, label: "Status", width: 120 }
]

table = table_view rows, columns: columns,
  selection_behavior: :rows,
  alternating_rows: true

on table, :cell_click do |cell|
  puts "Selected row: #{cell.fetch("row")}"
end
API

Component properties

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

rowsRows configuration for Table View.property
columnsColumns configuration for Table View.property
selected_rowSelected row configuration for Table View.property
selected_columnSelected column configuration for Table View.property
show_headerShow header configuration for Table View.property
header_heightHeader height configuration for Table View.property
row_heightRow height configuration for Table View.property
column_widthColumn width configuration for Table View.property
row_spacingRow spacing configuration for Table View.property
column_spacingColumn spacing configuration for Table View.property
selection_behaviorSelection behavior configuration for Table View.property
selection_modeSelection mode configuration for Table View.property
editableEditable configuration for Table View.property
edit_triggersEdit triggers configuration for Table View.property
alternating_rowsAlternating rows configuration for Table View.property
animateAnimate configuration for Table View.property
reuse_itemsReuse items configuration for Table View.property
key_navigation_enabledKey navigation enabled configuration for Table View.property
pointer_navigation_enabledPointer navigation enabled configuration for Table View.property
interactiveInteractive configuration for Table View.property
clipClip configuration for Table View.property
paddingPadding configuration for Table View.property
widthWidth configuration for Table View.property
heightHeight configuration for Table View.property
empty_textEmpty text configuration for Table View.property
enabledEnabled configuration for Table View.property
backgroundBackground configuration for Table View.property
header_backgroundHeader background configuration for Table View.property
cell_backgroundCell background configuration for Table View.property
alternate_backgroundAlternate background configuration for Table View.property
selected_backgroundSelected background configuration for Table View.property
foregroundForeground configuration for Table View.property
header_foregroundHeader foreground configuration for Table View.property
selected_foregroundSelected foreground configuration for Table View.property
mutedMuted configuration for Table View.property
accentAccent configuration for Table View.property
grid_colorGrid color configuration for Table View.property
border_colorBorder color configuration for Table View.property
radiusRadius configuration for Table View.property
font_familyFont family configuration for Table View.property
font_sizeFont size configuration for Table View.property
header_sizeHeader size configuration for Table View.property
accessible_nameAccessible name configuration for Table View.property
visibleVisible configuration for Table View.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.

cell_clickNative event payload
cell_double_clickNative event payload
activateNative event payload
selection_changeNative event payload
current_changeNative event payload
editNative event payload
row_count_changeNative event payload
column_count_changeNative event payload
scrollNative event payload
movement_startNative event payload
movement_endNative event payload
showNative event payload
hideNative event payload
focusNative event payload
blurNative event payload