From 32de8dce311ddc562f88db47149c702fe9dcc950 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 1 Mar 2019 11:16:33 +0100 Subject: Doc: Document peculiarity of sorting DelegateModelGroups If an item is part of multiple groups, moving it in one group also moves it in all other groups. This has been the case since the groups exist. Fixes: QTBUG-73707 Change-Id: Id1a6e82f667eaf992982e693475b734f485eb8a2 Reviewed-by: Mitch Curtis --- src/qml/types/qqmldelegatemodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/types') diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index fa7ce946fb..572f58339f 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -2483,7 +2483,8 @@ void QQmlDelegateModelGroupPrivate::destroyingPackage(QQuickPackage *package) information about group membership and indexes as well as model data. In combination with the move() function this can be used to implement view sorting, with remove() to filter items out of a view, or with setGroups() and \l Package delegates to categorize items into - different views. + different views. Different groups can only be sorted independently if they are disjunct. Moving + an item in one group will also move it in all other groups it is a part of. Data from models can be supplemented by inserting data directly into a DelegateModelGroup with the insert() function. This can be used to introduce mock items into a view, or -- cgit v1.2.3