Qt Reference Documentation

QML Scale Element

The Scale element provides a way to scale an Item. More...

Scale instantiates the C++ class QGraphicsScale

  • List of all members, including inherited members
  • Properties

    Detailed Description

    The Scale element gives more control over scaling than using Item's scale property. Specifically, it allows a different scale for the x and y axes, and allows the scale to be relative to an arbitrary point.

    The following example scales the X axis of the Rectangle, relative to its interior point 25, 25:

     Rectangle {
         width: 100; height: 100
         color: "blue"
         transform: Scale { origin.x: 25; origin.y: 25; xScale: 3}

    See also Rotation and Translate.

    Property Documentation

    origin.x : real

    origin.y : real

    The point that the item is scaled from (i.e., the point that stays fixed relative to the parent as the rest of the item grows). By default the origin is 0, 0.

    xScale : real

    The scaling factor for the X axis.

    yScale : real

    The scaling factor for the Y axis.


    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.

    [0]; s.parentNode.insertBefore(ga, s); })();