diff options
Diffstat (limited to 'examples/declarative/modelviews/package/view.qml')
-rw-r--r-- | examples/declarative/modelviews/package/view.qml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/declarative/modelviews/package/view.qml b/examples/declarative/modelviews/package/view.qml new file mode 100644 index 0000000..67f896b --- /dev/null +++ b/examples/declarative/modelviews/package/view.qml @@ -0,0 +1,35 @@ +import Qt 4.7 + +Item { + width: 400 + height: 200 + + ListModel { + id: myModel + ListElement { display: "One" } + ListElement { display: "Two" } + ListElement { display: "Three" } + ListElement { display: "Four" } + ListElement { display: "Five" } + ListElement { display: "Six" } + ListElement { display: "Seven" } + ListElement { display: "Eight" } + } + //![0] + VisualDataModel { + id: visualModel + delegate: Delegate {} + model: myModel + } + + ListView { + width: 200; height:200 + model: visualModel.parts.list + } + GridView { + x: 200; width: 200; height:200 + cellHeight: 50 + model: visualModel.parts.grid + } + //![0] +} |