Skip to content

UniDeskImage Type

Image display control based on QtQuick AnimatedImage. Supports loading local, network, and QRC resource images, with a built-in fade transition animation on image changes.

ItemDescription
Control TypeVisual Control
Source FileUniDesk/Controls/UniDeskImage.qml
InheritsQtQuick AnimatedImage
QML Importimport UniDesk.Controls 1.0

Custom Properties

PropertyTypeDefaultDescription
animationEnabledbooltrueEnable transition animation
animationDurationint300Animation duration in milliseconds

Behavior

  • Auto-plays when image is loaded (playing = status === Image.Ready)
  • Fade-out transition on source change: old image fades out, new image fades in
  • Hidden when no source (opacity: source.toString() !== "" ? 1 : 0)
  • Inherits all AnimatedImage properties (e.g. fillMode, source)

Example

qml
import UniDesk.Controls 1.0

UniDeskImage {
    width: 200
    height: 200
    source: "qrc:/images/logo.png"
    fillMode: Image.PreserveAspectCrop
    animationDuration: 500
}

Released under the CC BY-SA 4.0 open documentation license.