CSImage QML Type

Show a static or dynamic image. More...

Import Statement: import CSDataQuick.Components 1.0
Inherits:

CSGraphics

Properties

Detailed Description

The image can be any any image format supported by Qt, loaded from any URL scheme supported by Qt. The image is scaled to fit item size.

If the image file has multiple frames, the designer can choose to animate the images or to display a specified frame. The default is to animate if there is more than one frame. To display a specific frame, enter an expression for the imageCalc that returns a frame number.

CSImage {
    source: 'LED.gif'
    dynamicAttribute.channel: 'catest'
    imageCalc: 'A*10'
}

Property Documentation

imageCalc : string

For multiple-frame images, the frame to display is defined by this expression.

The syntax for the imageCalc expression is the same as that for the DynamicAttribute. The only difference is that the expression should return a frame number, not True or False. The Image will be black if the expression is invalid.

Frame numbers start with 0. The value will be rounded to the nearest integer. Frame numbers that are too high will use the last frame, and frame numbers that are too small will use the first frame.


source : url

This property holds the URL that refers to the source image.