Rotation QML Type

Provides a way to rotate an item. 更多...

导入语句: import QtQuick .
Since: Qt Quick Ultralite 1.0



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}

注意: Rotation is a slow operation on some platforms. When rotating images, use the QUL_OPTIMIZE_FOR_ROTATION property on the resource to enable optimizations.


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).