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

Context Menu

Context Menu is a native Zui component in the menus, dialogs, and feedback catalog, with 20 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
context_menu [{ text: "Copy", value: :copy }, { text: "Delete", value: :delete }], x: 120, y: 80, opened: true
API

Component properties

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

itemsItems configuration for Context Menu.property
targetTarget configuration for Context Menu.property
openedOpened configuration for Context Menu.property
xX configuration for Context Menu.property
yY configuration for Context Menu.property
activation_widthActivation width configuration for Context Menu.property
activation_heightActivation height configuration for Context Menu.property
widthWidth configuration for Context Menu.property
modalModal configuration for Context Menu.property
close_policyClose policy configuration for Context Menu.property
enabledEnabled configuration for Context Menu.property
backgroundBackground configuration for Context Menu.property
foregroundForeground configuration for Context Menu.property
mutedMuted configuration for Context Menu.property
accentAccent configuration for Context Menu.property
border_colorBorder color configuration for Context Menu.property
radiusRadius configuration for Context Menu.property
font_familyFont family configuration for Context Menu.property
font_sizeFont size configuration for Context Menu.property
visibleVisible configuration for Context Menu.property
Show 14 shared item properties
opacityscalerotationzheightfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

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

requestNative event payload
triggerNative event payload
toggleNative event payload
highlightNative event payload
openNative event payload
closeNative event payload
about_to_showNative event payload
about_to_hideNative event payload