このページでは

Scale QML Type

アイテムの拡大・縮小を行う方法を提供します。詳細...

Import Statement: import QtQuick

プロパティ

詳細な説明

Scale タイプは、スケール変換を通じて「Item 」をスケーリングする方法を提供します。

これにより、X軸とY軸で異なる拡大縮小係数を指定でき、任意の点を基準として拡大縮小を行うことが可能です。これにより、scale プロパティよりも詳細にアイテムの拡大縮小を制御できます。

次の例では、RectangleのX軸を、その内部の点 (25, 25) を基準としてスケーリングしています:

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

「 Rotation 」および「Translate 」も参照してください 。

プロパティのドキュメント

origin group

origin.x : real

origin.y : real

このプロパティは、アイテムがスケーリングされる起点となる点(つまり、アイテムの他の部分が拡大しても親要素に対して固定されたままの点)を保持します。

origin のデフォルト値は (0, 0) です。

xScale : real

X軸のスケーリング係数。

デフォルト値は 1.0 です。

yScale : real

Y軸のスケーリング係数。

デフォルト値は 1.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.