zui docs v0.0.5
GitHub ↗
Drawing and interaction Native Qt

Line

Line is a native Zui component in the drawing and interaction catalog, with 13 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
line 20, 80, 300, 80, stroke: "#66e3ff", stroke_width: 3, dash_pattern: [8, 4]
API

Component properties

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

x1X1 configuration for Line.property
y1Y1 configuration for Line.property
x2X2 configuration for Line.property
y2Y2 configuration for Line.property
widthWidth configuration for Line.property
heightHeight configuration for Line.property
strokeStroke configuration for Line.property
stroke_widthStroke width configuration for Line.property
capCap configuration for Line.property
dash_patternDash pattern configuration for Line.property
dash_offsetDash offset configuration for Line.property
antialiasingAntialiasing configuration for Line.property
visibleVisible configuration for Line.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.

clickNative event payload
hoverNative event payload