The Translate object provides a way to move an Item without changing its x or y properties. More...
This element was introduced in Qt 4.7.
The Translate object provides independent control over position in addition to the Item's x and y properties.
The following example moves the Y axis of the Rectangle elements while still allowing the Row element to lay the items out as if they had not been transformed:
import QtQuick 1.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 |
The translation along the X axis.
y : real |
The translation along the Y axis.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.