diff options
author | Paul Wicking <paul.wicking@qt.io> | 2022-10-19 10:51:03 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-19 23:43:06 +0000 |
commit | 0f66c729a4dbb60dc1007dc24b85f80fcfbdb23d (patch) | |
tree | 1da5d4a3f75149a977e1caa8b537e66ca21cac75 | |
parent | d34150025bb26319842e906f26841108ba34522f (diff) |
Doc: Expand DelegateModel documentation
A DelegateModel for a table model passed to a TableView
is one-dimensional.
Fixes: QTBUG-104960
Change-Id: I8bb9aeff929f6964ae8986a04738a94356c89595
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit c22a114c89e2c131acc51cde80d65943ae5041f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qmlmodels/qqmldelegatemodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp index 7222b6cb93..ad7ffd22ce 100644 --- a/src/qmlmodels/qqmldelegatemodel.cpp +++ b/src/qmlmodels/qqmldelegatemodel.cpp @@ -144,6 +144,9 @@ QQmlDelegateModelParts::QQmlDelegateModelParts(QQmlDelegateModel *parent) provide delegates to multiple views, and with DelegateModelGroup to sort and filter delegate items. + DelegateModel only supports one-dimensional models -- assigning a table model to + DelegateModel and that to TableView will thus only show one column. + The example below illustrates using a DelegateModel with a ListView. \snippet delegatemodel/delegatemodel.qml 0 |