![]() |
Home · All Classes · All Functions · Overviews |
The PathAttribute allows setting an attribute at a given position in a Path. More...
The PathAttribute object allows attibutes consisting of a name and a value to be specified for the endpoints of path segments. The attributes are exposed to the delegate as Attached Properties. The value of an attribute at any particular point is interpolated from the PathAttributes bounding the 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.scale and PathView.opacity attached properties to set the scale and opacity of the delegate.
Component { id: delegate Item { id: wrapper width: 80; height: 80 scale: PathView.scale opacity: PathView.opacity Column { Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } Text { id: name; text: name; font.pointSize: 16} } } } PathView { anchors.fill: parent; model: MenuModel; delegate: delegate path: Path { startX: 120; startY: 100 PathAttribute { name: "scale"; value: 1.0 } PathAttribute { name: "opacity"; value: 1.0 } PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } PathAttribute { name: "scale"; value: 0.3 } PathAttribute { name: "opacity"; value: 0.5 } PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } } } |
See also Path.
name : string |
the name of the attribute to change.
value : string |
the new value of the attribute.
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.7.0 |