PathPercent QML Type
パスの解釈方法を操作します。詳細...
| Import Statement: | import QtQuick |
プロパティ
- value : real
詳細説明
PathPercent を使用すると、PathView のパス上のアイテム間の間隔を調整できます。これにより、パスの特定の部分ではアイテムを密集させ、他の部分では間隔を広げるといった設定が可能です。
以下の例は、パスに沿ったアイテムの通常の配置と、パスのPathLine セクションに沿ってアイテムの50%を配置した場合の配置を比較したものです。
| |
| |
「Path」も参照してください 。
プロパティのドキュメント
value : real
この時点までにレイアウトすべき項目の割合。
この値は、パス上の前の位置でPathPercent によって指定された最後の値よりも常に大きくなければなりません。
次の例では、3 つの PathLine で構成される Path があります。 通常、PathView のアイテムは、このパスに沿って均等に配置され、各線分ごとに等しい数のアイテムが配置されます。PathPercent を使用すると、1番目と3番目の線分にはそれぞれ配置されるアイテムの10%を、2番目の線分には残りの80%を配置するように指定することができます。
PathView {
// ...
Path {
startX: 0; startY: 0
PathLine { x:100; y: 0; }
PathPercent { value: 0.1 }
PathLine { x: 100; y: 100 }
PathPercent { value: 0.9 }
PathLine { x: 100; y: 0 }
PathPercent { value: 1 }
}
}© 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.

