diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index 5ca83854859..00eca7578b7 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -446,14 +446,19 @@ */ /*! \fn template void QList::resize(qsizetype size) + \since 6.0 Sets the size of the list to \a size. If \a size is greater than the current size, elements are added to the end; the new elements are initialized with a \l{default-constructed value}. If \a size is less than the current size, elements are removed from the end. - Since Qt 5.6, resize() doesn't shrink the capacity anymore. - To shed excess capacity, use squeeze(). + If this list is not shared, the capacity() is preserved. Use squeeze() + to shed excess capacity. + + \note In Qt versions prior to 5.7 (for QVector; QList lacked a resize() + until 6.0), this function released the memory used by the list instead of + preserving the capacity. \sa size() */