zui docs v0.0.5
GitHub ↗
Display, content, and media Native Qt

Avatar

A compact identity surface that displays an image or derives a fallback from a name.

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
avatar "assets/ada.png", name: "Ada Lovelace", size: 48
API

Component properties

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

sourceSource configuration for Avatar.property
nameName configuration for Avatar.property
sizeSize configuration for Avatar.property
radiusRadius configuration for Avatar.property
backgroundBackground configuration for Avatar.property
foregroundForeground configuration for Avatar.property
font_sizeFont size configuration for Avatar.property
asynchronousAsynchronous configuration for Avatar.property
cacheCache configuration for Avatar.property
visibleVisible configuration for Avatar.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.

clickNative event payload
loadedNative event payload
errorNative event payload