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
Pick-to: 6.2 6.1 5.15
Change-Id: I85d38373fb7edf5a5407622b32870e7bcd5d9aeb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
bb10
Volker Hilsheimer 2021-07-14 12:45:32 +02:00
parent 85e82de916
commit f6bca62611
1 changed files with 11 additions and 2 deletions

View File

@ -2687,7 +2687,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()
@ -2709,7 +2712,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()
@ -2774,6 +2780,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)