Translate QML Type

Provides a way to move an item without changing its x or y properties. 更多...

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

特性

详细描述

The Translate type provides independent control over position in addition to the Item's x and y properties.

The following example moves the Y axis of the 图像 items while still allowing the Row to lay the items out as if they had not been transformed:

import QtQuick 2.15
Row {
    Image {
        source: "qrc:/bluerect.png"
        transform: Translate { y: 20 }
    }
    Image {
        source: "qrc:/redrect.png"
        transform: Translate { y: -20 }
    }
}
						

特性文档编制

x : real

The translation along the X axis.

The default value is 0.0.


y : real

The translation along the Y axis.

The default value is 0.0.