Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1041261
  • 博文数量: 264
  • 博客积分: 6005
  • 博客等级: 大校
  • 技术积分: 2798
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-08 20:15
文章分类

全部博文(264)

文章存档

2011年(42)

2010年(213)

2009年(4)

2008年(2)

2007年(3)

分类:

2010-10-14 21:52:51

ListModel {
    id: model
    ListElement { fruit: "Bilberry"; 
                  picture: "" }
    ListElement { fruit: "Kumquat"; 
                  picture: "" }
    ListElement { fruit: "Grapefruit"; picture: 
                  "
Table_grapes_on_white.jpg/250px-Table_grapes_on_white.jpg" }
}
Component {
    id: delegate
    Item {
        width: 100; height: 100
        scale: PathView.scale
        Column { Image { anchors.fill: parent; source: picture;  } 
                 Text { text: fruit; font.pointSize: 24; }
        }
    }
}
PathView {
    anchors.fill: parent
    model: model;
    delegate: delegate
    path: Path {
        startX: 100; startY: 100
        PathAttribute { name: "scale"; value: 0.5 }
        PathLine { x:200; y:200 }
        PathAttribute { name: "scale"; value: 1.0 }
        PathLine { x:300; y:100 }
        PathLine { x:100; y:100 }
    }
}
阅读(3423) | 评论(0) | 转发(0) |
0

上一篇:qml Flow 特效

下一篇:qml Particle Effects

给主人留下些什么吧!~~