Obsolete Members for QList

The following members of class QList are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(deprecated in 6.0) QList<T> toList() const
(deprecated in 6.0) QList<T> toVector() const

Static Public Members

(deprecated in 6.0) QList<T> fromList(const QList<T> &list)
(deprecated in 6.0) QList<T> fromVector(const QList<T> &list)

Member Function Documentation

[static noexcept, deprecated in 6.0] QList<T> QList::fromList(const QList<T> &list)

[static noexcept, deprecated in 6.0] QList<T> QList::fromVector(const QList<T> &list)

This function is deprecated since 6.0. We strongly advise against using it in new code.

A no-op in Qt 6. Provided for backwards compatibility with Qt 5, where QList and QVector were two different types.

Returns this list.

[noexcept, deprecated in 6.0] QList<T> QList::toList() const

[noexcept, deprecated in 6.0] QList<T> QList::toVector() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

A no-op in Qt 6. Provided for backwards compatibility with Qt 5, where QList and QVector where two different types.

Returns this list.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.