New Classes and Functions in Qt 6.0

The section provides a comprehensive list of all new classes and functions introduced in Qt 6.0.

New Namespaces

namespace QNativeInterface
namespace QQuickOpenGLUtils

New Classes

New Member Functions

Class QBitmap:

QBitmap fromPixmap(const QPixmap &pixmap)

Class QBluetoothDeviceInfo:

QList<QBluetoothUuid> serviceUuids() const

Class QCanBusDeviceInfo:

QString alias() const

Class QChar:

QChar fromUcs2(char16_t c)
R fromUcs4(char32_t c)

Class QDataStream:

QDataStream &operator<<(char16_t c)
QDataStream &operator<<(char32_t c)
QDataStream &operator<<(QDataStream &out, const std::pair<T1, T2> &pair)
QDataStream &operator>>(char16_t &c)
QDataStream &operator>>(char32_t &c)
QDataStream &operator>>(QDataStream &in, std::pair<T1, T2> &pair)

Class QDebug:

QDebug &operator<<(const char16_t *t)
QDebug &operator<<(QUtf8StringView s)
QDebug &operator<<(QByteArrayView t)
QString toString(T &&object)

Class QExplicitlySharedDataPointer:

T *get() const
void reset(T *ptr)

Class QFuture:

bool isSuspended() const
bool isSuspending() const
bool isValid() const
QFuture<T> onCanceled(Function &&handler)
QFuture<T> onFailed(Function &&handler)
void setSuspended(bool suspend)
void suspend()
T takeResult()
QFuture<ResultType<Function>> then(Function &&function)
QFuture<ResultType<Function>> then(QtFuture::Launch policy, Function &&function)
QFuture<ResultType<Function>> then(QThreadPool *pool, Function &&function)
void toggleSuspended()

Class QImageReader:

int allocationLimit()
void setAllocationLimit(int mbLimit)

Class QLibraryInfo:

QString path(QLibraryInfo::LibraryPath p)

Class QList:

void append(QList<T> &&value)
QList<T> first(qsizetype n) const
QList<T> last(qsizetype n) const
QList<T> operator+(QList<T> &&other) const
QList<T> &operator+=(QList<T> &&other)
QList<T> &operator<<(QList<T> &&other)
QList<T> sliced(qsizetype pos, qsizetype n) const
QList<T> sliced(qsizetype pos) const

Class QMap:

QMap::iterator erase(QMap::const_iterator first, QMap::const_iterator last)
std::map<Key, T> toStdMap() &&

Class QMetaSequence:

QMetaSequence fromContainer()

Class QMultiMap:

QMultiMap::iterator erase(QMultiMap::const_iterator first, QMultiMap::const_iterator last)

Class QPagedPaintDevice:

QPageRanges pageRanges() const
virtual void setPageRanges(const QPageRanges &ranges)

Class QPointer:

T *get() const

Class QRect:

QRect span(const QPoint &p1, const QPoint &p2)

Class QRegularExpression:

QRegularExpression fromWildcard(QStringView pattern, Qt::CaseSensitivity cs, QRegularExpression::WildcardConversionOptions options)
QRegularExpressionMatchIterator globalMatch(QStringView subjectView, qsizetype offset, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions) const
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions) const

Class QSharedDataPointer:

T *get()
const T *get() const
void reset(T *ptr)
T *take()

Class QSqlQuery:

QVariantList boundValues() const

Class QStringTokenizer:

decltype(QtPrivate::Tok::TokenizerResult<Haystack, Needle>{std::forward<Haystack>(h), std::forward<Needle>(n), flags...}) qTokenize(Haystack &&haystack, Needle &&needle, Flags... flags)

Class QStringView:

QStringView::const_pointer constData() const
qsizetype count(QChar ch, Qt::CaseSensitivity cs) const
qsizetype count(QStringView str, Qt::CaseSensitivity cs) const
QStringView first(qsizetype n) const
QStringView last(qsizetype n) const
QStringView sliced(qsizetype pos, qsizetype n) const
QStringView sliced(qsizetype pos) const
CFStringRef toCFString() const
double toDouble(bool *ok) const
float toFloat(bool *ok) const
int toInt(bool *ok, int base) const
long toLong(bool *ok, int base) const
qlonglong toLongLong(bool *ok, int base) const
NSString *toNSString() const
short toShort(bool *ok, int base) const
uint toUInt(bool *ok, int base) const
ulong toULong(bool *ok, int base) const
qulonglong toULongLong(bool *ok, int base) const
ushort toUShort(bool *ok, int base) const
decltype(qTokenize(*this, std::forward<Needle>(needle), flags...)) tokenize(Needle &&sep, Flags... flags) const

Class QUnhandledException:

std::exception_ptr exception() const
void swap(QUnhandledException &other)

Class QVarLengthArray:

QVarLengthArray<T, Prealloc> &operator=(QVarLengthArray<T, Prealloc> &&other)

New Functions in Namespaces

void resetOpenGLState()
QTaskBuilder<Task> task(Task &&task)

New Global Functions

long double qDegreesToRadians(long double degrees)
long double qRadiansToDegrees(long double radians)

New Macros

QT_IMPLICIT_QCHAR_CONSTRUCTION
Q_OBJECT_BINDABLE_PROPERTY(containingClass, type, name, signal)
Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(containingClass, type, name, initialvalue, signal)
Q_OBJECT_COMPUTED_PROPERTY(containingClass, type, name, callback)

New Enum Types

enum IntermediateError { ResponseCrcError, ResponseRequestMismatch }
enum WildcardConversionOption { DefaultWildcardConversion, UnanchoredWildcardConversion }
enum class Launch { Sync, Async, Inherit }

New Type Aliases

New Properties

New Variables

New QML Properties

QML Type GeometryRenderer:

sortIndex : float