diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-07-01 06:32:30 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-07-01 06:55:42 (GMT) |
commit | 3084b54e7a4f6163dadcf3e52143391b10b5352e (patch) | |
tree | 7e5cdb9fde77a0164ac5c01a0a05bc392c01a0a4 /examples/declarative/modelviews/objectlistmodel | |
parent | 0e7f70bb44eae2798c7f2198b713dc1c6ab6f652 (diff) | |
download | Qt-3084b54e7a4f6163dadcf3e52143391b10b5352e.zip Qt-3084b54e7a4f6163dadcf3e52143391b10b5352e.tar.gz Qt-3084b54e7a4f6163dadcf3e52143391b10b5352e.tar.bz2 |
Add abstractitemmodel example, and fix some model docs
Diffstat (limited to 'examples/declarative/modelviews/objectlistmodel')
-rw-r--r-- | examples/declarative/modelviews/objectlistmodel/main.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/declarative/modelviews/objectlistmodel/main.cpp b/examples/declarative/modelviews/objectlistmodel/main.cpp index 8c921b7..89c22a1 100644 --- a/examples/declarative/modelviews/objectlistmodel/main.cpp +++ b/examples/declarative/modelviews/objectlistmodel/main.cpp @@ -56,10 +56,8 @@ //![0] int main(int argc, char ** argv) { -//![0] QApplication app(argc, argv); -//![1] QList<QObject*> dataList; dataList.append(new DataObject("Item 1", "red")); dataList.append(new DataObject("Item 2", "green")); @@ -69,13 +67,11 @@ int main(int argc, char ** argv) QDeclarativeView view; QDeclarativeContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); +//![0] view.setSource(QUrl("qrc:view.qml")); view.show(); -//![1] return app.exec(); -//![2] } -//![2] |