QML PathAttribute ElementThe PathAttribute allows setting an attribute at a given position in a Path. More... This element was introduced in Qt 4.7. PropertiesDetailed DescriptionThe PathAttribute object allows attributes consisting of a name and a value to be specified for various points along a path. The attributes are exposed to the delegate as Attached Properties. The value of an attribute at any particular point along the path is interpolated from the PathAttributes bounding that point. The example below shows a path with the items scaled to 30% with opacity 50% at the top of the path and scaled 100% with opacity 100% at the bottom. Note the use of the PathView.iconScale and PathView.iconOpacity attached properties to set the scale and opacity of the delegate.
See also Path. Property DocumentationThis property holds the name of the attribute to change. This attribute will be available to the delegate as PathView.<name> Note that using an existing Item property name such as "opacity" as an attribute is allowed. This is because path attributes add a new Attached Property which in no way clashes with existing properties. This property holds the value for the attribute. The value specified can be used to influence the visual appearance of an item along the path. For example, the following Path specifies an attribute named itemRotation, which has the value 0 at the beginning of the path, and the value 90 at the end of the path. Path { startX: 0 startY: 0 PathAttribute { name: "itemRotation"; value: 0 } PathLine { x: 100; y: 100 } PathAttribute { name: "itemRotation"; value: 90 } } In our delegate, we can then bind the rotation property to the Attached Property PathView.itemRotation created for this attribute. Rectangle { width: 10; height: 10 rotation: PathView.itemRotation } As each item is positioned along the path, it will be rotated accordingly: an item at the beginning of the path with be not be rotated, an item at the end of the path will be rotated 90 degrees, and an item mid-way along the path will be rotated 45 degrees. © 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. |