summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-09-05 13:32:48 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-07 18:41:22 +0200
commit942180e8da93fd3adde7891bd92799b921390bcd (patch)
treea826b88763e76f5840cbe5fd97317f7bb12ade03 /src/corelib/itemmodels
parent19fc1de9fc5fda0db672231785bea3f3ae098fca (diff)
doc: Clean up QAbstractItemModel documentation
Mention QML as an alternative to widgets in the documentation, and fix a typo Change-Id: Ia6aaef9ec73d5112ff45c22b0bf57f1f9c7d31a3 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index 6aa8b2feb3..902f2f8219 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -1060,11 +1060,13 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
Instead, you should subclass it to create new models.
The QAbstractItemModel class is one of the \l{Model/View Classes}
- and is part of Qt's \l{Model/View Programming}{model/view framework}.
+ and is part of Qt's \l{Model/View Programming}{model/view framework}. It
+ can be used as the underlying data model for the item view elements in
+ QML or the item view classes in the QtWidgets module.
- If you need a model to use with a QListView or a QTableView, you should
- consider subclassing QAbstractListModel or QAbstractTableModel instead of
- this class.
+ If you need a model to use with an item view such as QML's List View
+ element or the C++ widgets QListView or QTableView, you should consider
+ subclassing QAbstractListModel or QAbstractTableModel instead of this class.
The underlying data model is exposed to views and delegates as a hierarchy
of tables. If you do not make use of the hierarchy, then the model is a
@@ -2901,7 +2903,7 @@ void QAbstractItemModel::endRemoveColumns()
columns up to \a sourceLast.
However, when moving columns down in the same parent (\a sourceParent
- and \a destinationParent are equal), the columnss will be placed before the
+ and \a destinationParent are equal), the columns will be placed before the
\a destinationChild index. That is, if you wish to move columns 0 and 1 so
they will become columns 1 and 2, \a destinationChild should be 3. In this
case, the new index for the source column \c i (which is between