이 페이지에서

PathPercent QML Type

경로가 해석되는 방식을 조정합니다. 더 보기...

Import Statement: import QtQuick

속성

상세 설명

PathPercent를 사용하면 PathView 의 경로 상에 있는 항목들 간의 간격을 조정할 수 있습니다. 이를 통해 경로의 일부 구간에서는 항목들을 밀집시켜 배치하고, 다른 구간에서는 흩어지게 배치할 수 있습니다.

아래 예시는 경로를 따라 항목이 정상적으로 분포된 경우와, 경로의 PathLine 구간을 따라 항목의 50%가 배치된 경우를 비교하여 보여줍니다.

S자형 경로를 따라 항목이 고르게 분포된 PathView

PathView {
    // ...
    Path {
        startX: 20; startY: 0
        PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
        PathLine { x: 150; y: 80 }
        PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
    }
}

항목의 50%가 중간 PathLine 구간에 몰려 있는 PathView

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

이 지점까지 배치해야 할 항목의 비율입니다.

이 값은 항상 경로(Path)의 이전 위치에서 경로 제어점( PathPercent )으로 지정된 마지막 값보다 커야 합니다.

다음 예제에서는 세 개의 PathLine으로 구성된 Path가 있습니다. 일반적으로 PathView 의 항목들은 이 경로를 따라 선분당 동일한 수의 항목이 배열되도록 균등하게 배치됩니다. ` PathPercent `을 사용하면 첫 번째와 세 번째 선에 각각 배치된 항목의 10%를, 두 번째 선에 나머지 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.