Translate QML Type
Bietet eine Möglichkeit, ein Objekt zu verschieben, ohne seine x- oder y-Eigenschaften zu verändern. Mehr...
Import Statement: | import QtQuick |
Eigenschaften
Detaillierte Beschreibung
Der Typ Translate bietet zusätzlich zu den x- und y-Eigenschaften des Elements eine unabhängige Kontrolle über die Position.
Im folgenden Beispiel wird die Y-Achse der Elemente von Rectangle verschoben, wobei Row die Elemente so anordnen kann, als ob sie nicht transformiert worden wären:
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 } } }
Eigenschaft Dokumentation
x : real |
Die Verschiebung entlang der X-Achse.
Der Standardwert ist 0.0.
y : real |
Die Verschiebung entlang der Y-Achse.
Der Standardwert ist 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.