Translate QML Type

항목의 x 또는 y 속성을 변경하지 않고 항목을 이동하는 방법을 제공합니다. 더 보기...

Import Statement: import QtQuick

속성

  • x : real
  • y : real

상세 설명

번역 유형은 항목의 x 및 y 속성 외에 위치에 대한 독립적인 제어 기능을 제공합니다.

다음 예제는 Rectangle 항목의 Y축을 이동하면서도 Row 항목은 변형되지 않은 것처럼 배치합니다:

import QtQuick 2.0

Row {
    Rectangle {
        width: 100; height: 100
        color: "blue"
        transform: Translate { y: 20 }
    }
    Rectangle {
        width: 100; height: 100
        color: "red"
        transform: Translate { y: -20 }
    }
}

속성 문서

x : real

X 축을 따라 이동합니다.

기본값은 0.0입니다.


y : real

Y 축을 따른 이동입니다.

기본값은 0.0입니다.


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.