diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-14 12:45:32 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-14 16:26:09 +0000 |
commit | ba0bca338c4fa743b007a4c4f204f09f9e5a8a80 (patch) | |
tree | e38742bb2f9894684224b60a93b10075b4fb9b7d | |
parent | 8c0dacb5e18427254e337c4a305b762a97c5c364 (diff) |
Point out that QTreeView's expandAll/expandToDepth don't fetch data
They will only expand what's currently in the model.
As a drive-by, remove superfluous : after the \warning macro.
Fixes: QTBUG-94981
Change-Id: I85d38373fb7edf5a5407622b32870e7bcd5d9aeb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f6bca6261156e8f648bf7d41ba1728ef17cd6889)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/widgets/itemviews/qtreeview.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index be0feab7bd..0fab746603 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -2665,7 +2665,10 @@ QSize QTreeView::viewportSizeHint() const \since 4.2 Expands all expandable items. - \warning: if the model contains a large number of items, + \note This function will not try to \l{QAbstractItemModel::fetchMore}{fetch more} + data. + + \warning If the model contains a large number of items, this function will take some time to execute. \sa collapseAll(), expand(), collapse(), setExpanded() @@ -2687,7 +2690,10 @@ void QTreeView::expandAll() A \a depth of -1 will expand all children, a \a depth of 0 will only expand the given \a index. - \warning: if the model contains a large number of items, + \note This function will not try to \l{QAbstractItemModel::fetchMore}{fetch more} + data. + + \warning If the model contains a large number of items, this function will take some time to execute. \sa expandAll() @@ -2752,6 +2758,9 @@ void QTreeView::collapseAll() \since 4.3 Expands all expandable items to the given \a depth. + \note This function will not try to \l{QAbstractItemModel::fetchMore}{fetch more} + data. + \sa expandAll(), collapseAll(), expand(), collapse(), setExpanded() */ void QTreeView::expandToDepth(int depth) |