Qt Reference Documentation

QML Translate Element

The Translate object provides a way to move an Item without changing its x or y properties. More...

  • List of all members, including inherited members
  • Properties

    • x : real
    • y : real

    Detailed Description

    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 }
         }
     }

    Property Documentation

    x : real

    The translation along the X axis.


    y : real

    The translation along the Y axis.


    X

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.