zui docs v0.0.5
GitHub ↗
Animation, state, and timing Native Qt

Timer

A declarative native timer for one-shot or repeating triggers.

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
clock = timer 1_000, repeat: true, running: true
on clock, :trigger do
  puts "Timer triggered"
end
API

Component properties

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

intervalInterval configuration for Timer.property
repeatRepeat configuration for Timer.property
runningRunning configuration for Timer.property
triggered_on_startTriggered on start configuration for Timer.property
restartRestart configuration for Timer.property
revisionRevision configuration for Timer.property
visibleVisible configuration for Timer.property
Show 16 shared item properties
enabledopacityscalerotationzwidthheightfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

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

triggerNative event payload
startNative event payload
stopNative event payload