Translate QML Type
Permet de déplacer un élément sans modifier ses propriétés x ou y. Plus d'informations...
| Import Statement: | import QtQuick |
Propriétés
Description détaillée
Le type Translate permet un contrôle indépendant de la position en plus des propriétés x et y de l'élément.
L'exemple suivant déplace l'axe Y des éléments Rectangle tout en permettant à Row de disposer les éléments comme s'ils n'avaient pas été transformés :
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 } } }

Documentation des propriétés
x : real
La translation le long de l'axe X.
La valeur par défaut est 0,0.
y : real
La translation le long de l'axe Y.
La valeur par défaut est 0,0.
© 2026 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.