Rotation QML Type

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

Import Statement: import QtQuick
Since: Qt Quick Ultralite 1.0


Detailed Description

The Rotation type provides a way to rotate an item through a rotation-type transform.

It allows (z axis) rotation to be relative to an arbitrary point.

The following example rotates a Image around its interior point (25, 25):

Image {
    source: "qrc:/bluerect.png"
    transform: Rotation { origin.x: 25; origin.y: 25; angle: 45}

Note: set ImageFiles.MCU.Experimental.resourceSplitImageOptimization to false to avoid rendering artifacts (when creating a rotation animation, for example).

Note: Rotation is a slow operation on some platforms. When rotating images, use the ImageFiles.MCU.resourceOptimizeForRotation property on the resource to enable optimizations.

Property Documentation

angle : real

The angle to rotate, in degrees clockwise.

origin group

origin.x : real

origin.y : real

The origin point of the rotation (i.e., the point that stays fixed relative to the parent as the rest of the item rotates). By default the origin is (0, 0).

Available under certain Qt licenses.
Find out more.