EAvatar Avatar
Examples
Icon avatars, custom fallback and fitting
Avatar
Properties
altstringAlternative text when the avatar source cannot load.
""backgroundColorcolorBackground color.
Dynamic bindingcontentaliasContent slot; declare QML child objects directly inside the component.
Alias: fallbackContent.dataenabledboolAllow interaction; false disables the control.
truefillModeintHow the avatar image scales and fills its available space.
Image.StretchImage.PreserveAspectFitImage.PreserveAspectCrop
Image.PreserveAspectCropheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighticonSourceintIcon used by the component.
EIcons.*
0 (no icon)
0shapestringAvatar shape.
circle
square
"circle"sizeintAvatar diameter or side length in pixels.
40sourceurlImage or media resource URL supported by Qt.
""srcsetstringAlternative avatar sources used to choose an image resource.
""textstringDisplayed text.
""visibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidtheffectiveSourceurlRead onlyActual avatar URL resolved from source and srcset.
Computed at runtimeloadedboolRead onlyWhether the avatar image has loaded successfully.
Computed at runtimeSignals
loadError()Emitted when the image fails to load; use it to show fallback content.