Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcontainerfwd.h File Reference

(7ce6920aacfcba485cd8017e01c6aeb324292e75)

#include <QtCore/qtconfigmacros.h>
#include <QtCore/qtypes.h>
#include <cstddef>
#include <utility>
#include <limits>
+ Include dependency graph for qcontainerfwd.h:

Go to the source code of this file.

Namespaces

namespace  QtPrivate
 \macro QT_NO_KEYWORDS >
 

Typedefs

template<typename T1 , typename T2 >
using QPair = std::pair<T1, T2>
 
template<typename T >
using QVector = QList<T>
 
using QStringList = QList<QString>
 Constructs a string list that contains the given string, str.
 
using QByteArrayList = QList<QByteArray>
 
using QVariantList = QList<QVariant>
 
using QVariantMap = QMap<QString, QVariant>
 
using QVariantHash = QHash<QString, QVariant>
 
using QVariantPair = std::pair<QVariant, QVariant>
 

Variables

constexpr qsizetype QVarLengthArrayDefaultPrealloc = 256
 
constexpr qsizetype QtPrivate::MaxAllocSize = (std::numeric_limits<qsizetype>::max)()
 

Typedef Documentation

◆ QByteArrayList

using QByteArrayList = QList<QByteArray>

Definition at line 42 of file qcontainerfwd.h.

◆ QPair

template<typename T1 , typename T2 >
using QPair = std::pair<T1, T2>

Definition at line 28 of file qcontainerfwd.h.

◆ QStringList

QStringList = QList<QString>

Constructs a string list that contains the given string, str.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Constructs a copy of other.

Longer lists are easily created like this:

QStringList longerList = (QStringList() << str1 << str2 << str3);
See also
append()

This operation takes \l{constant time}, because QStringList is \l{implicitly shared}. This makes returning a QStringList from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes \l{linear time}.

See also
operator=()
Since
5.4

Move-constructs from QList<QString>.

After a successful construction, other will be empty.

Definition at line 40 of file qcontainerfwd.h.

◆ QVariantHash

using QVariantHash = QHash<QString, QVariant>
related

Definition at line 53 of file qcontainerfwd.h.

◆ QVariantList

using QVariantList = QList<QVariant>
related

Definition at line 51 of file qcontainerfwd.h.

◆ QVariantMap

using QVariantMap = QMap<QString, QVariant>
related

Definition at line 52 of file qcontainerfwd.h.

◆ QVariantPair

using QVariantPair = std::pair<QVariant, QVariant>

Definition at line 54 of file qcontainerfwd.h.

◆ QVector

template<typename T >
using QVector = QList<T>

Definition at line 39 of file qcontainerfwd.h.

Variable Documentation

◆ QVarLengthArrayDefaultPrealloc

qsizetype QVarLengthArrayDefaultPrealloc = 256
constexpr

Definition at line 34 of file qcontainerfwd.h.