PathPercent QML Type
パスの解釈方法を操作する。詳細...
Import Statement: | import QtQuick |
プロパティ
- value : real
詳しい説明
PathPercent を使うと、PathView のパス上のアイテムの間隔を操作することができます。これを使用して、パスの一部でアイテムをまとめ、パスの他の部分でそれらを広げることができます。
下記の例では、パスに沿ったアイテムの正規分布と、パスのPathLine セクションにアイテムの 50% を配置する分布とを比較しています。
PathView { // ... Path { startX: 20; startY: 0 PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } PathPercent { value: 0.25 } PathLine { x: 150; y: 80 } PathPercent { value: 0.75 } PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } PathPercent { value: 1 } } } |
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 } } }
© 2025 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.