zui docs v0.0.5
GitHub ↗
Menus, dialogs, and feedback Native Qt

Menu Item

Menu Item is a native Zui component in the menus, dialogs, and feedback catalog, with 23 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
menu_item("Duplicate", value: :duplicate, icon: :copy, shortcut: "Ctrl+D") { puts "Duplicate selected" }
API

Component properties

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

textText configuration for Menu Item.property
valueValue configuration for Menu Item.property
iconIcon configuration for Menu Item.property
icon_sourceIcon source configuration for Menu Item.property
icon_colorIcon color configuration for Menu Item.property
shortcutShortcut configuration for Menu Item.property
enabledEnabled configuration for Menu Item.property
checkableCheckable configuration for Menu Item.property
checkedChecked configuration for Menu Item.property
highlightedHighlighted configuration for Menu Item.property
widthWidth configuration for Menu Item.property
heightHeight configuration for Menu Item.property
backgroundBackground configuration for Menu Item.property
highlighted_backgroundHighlighted background configuration for Menu Item.property
foregroundForeground configuration for Menu Item.property
highlighted_foregroundHighlighted foreground configuration for Menu Item.property
mutedMuted configuration for Menu Item.property
accentAccent configuration for Menu Item.property
border_colorBorder color configuration for Menu Item.property
radiusRadius configuration for Menu Item.property
font_familyFont family configuration for Menu Item.property
font_sizeFont size configuration for Menu Item.property
visibleVisible configuration for Menu Item.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.

triggerNative event payload
toggleNative event payload
changeNative event payload
pressNative event payload
releaseNative event payload
hoverNative event payload
highlightNative event payload
focusNative event payload
blurNative event payload