C

Scale QML Type

Provides a way to scale an item. More...

Import Statement: import QtQuick
Since: Qt Quick Ultralite 1.0

Properties

Detailed Description

The Scale type provides a way to scale an item through a scale-type transform.

It allows different scaling values for the x and y axes, and allows the scale to be relative to an arbitrary point.

The following example scales the X axis of the Image, relative to its interior point (25, 25):

Image {
    width: 100; height: 100
    source: "qrc:/bluerect.png"
    transform: Scale { origin.x: 25; origin.y: 25; xScale: 3}
}

Note: Disable QUL_RESOURCE_SPLIT_IMAGE_OPTIMIZATION to avoid rendering artifacts in case you apply a non-integer scaling factor (when creating a scaling animation, for example).

Note: Scaling is a slow operation on some platforms. When scaling images, use the QUL_RESOURCE_OPTIMIZE_FOR_SCALE property on the resource to enable optimizations.

See also Rotation and Translate.

Property Documentation

origin group

origin.x : real

origin.y : real

This property holds the point that the item is scaled from (that is, the point that stays fixed relative to the parent as the rest of the item grows).

The default value of the origin is (0, 0).


xScale : real

The scaling factor for the X axis.

The default value is 1.0.


yScale : real

The scaling factor for the Y axis.

The default value is 1.0.


Available under certain Qt licenses.
Find out more.