PathPercent QML Type
Manipula la forma en que se interpreta una ruta. Más...
| Import Statement: | import QtQuick |
Propiedades
- value : real
Descripción detallada
PathPercent le permite manipular el espaciado entre los elementos en un PathView's ruta. Puede utilizarlo para agrupar elementos en parte de la ruta y separarlos en otras partes de la ruta.
Los ejemplos siguientes muestran la distribución normal de los elementos a lo largo de una ruta comparada con una distribución que coloca el 50% de los elementos a lo largo de la sección PathLine de la ruta.
| |
| 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 } } } |
Véase también Path.
Documentación de propiedades
value : real
La proporción de elementos que deben colocarse hasta este punto.
Este valor debe ser siempre superior al último valor especificado por un PathPercent en una posición anterior del Path.
En el siguiente ejemplo tenemos una ruta formada por tres PathLines. Normalmente, los elementos de PathView se distribuirían equitativamente a lo largo de la ruta, con el mismo número de elementos por segmento de línea. PathPercent nos permite especificar que la primera y la tercera línea deben contener cada una el 10% de los elementos distribuidos, mientras que la segunda línea debe contener el 80% restante.
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.

