New Classes and Functions in Qt 6.1 | Qt 6.3

- Qt 6.3
- New Classes and Functions in Qt 6.1
- Qt 6.3.0 Reference Documentation

# New Classes and Functions in Qt 6.1

This page contains a comprehensive list of all new classes and functions introduced in Qt 6.1. Links to new APIs in previous Qt 6 releases are found at the bottom of this page.

- New Classes
- New Member Functions
- New Functions in Namespaces
- New Global Functions
- New Enum Types
- New Type Aliases
- New Properties
- New Variables

### New Classes

J
  QJniEnvironment
  QJniObject
  QJSManagedValue
  QJSPrimitiveNull
  QJSPrimitiveUndefined
  QJSPrimitiveValue

N
  QNetworkInformation

### New Member Functions

Class QByteArray:

QByteArray::iterator | erase(QByteArray::const_iterator first, QByteArray::const_iterator last)
qsizetype | erase(QByteArray &ba, const T &t)
qsizetype | erase_if(QByteArray &ba, Predicate pred)
QByteArray & | removeIf(Predicate pred)

Class QFuture:

QFuture<T> | onCanceled(QObject *context, Function &&handler)
QFuture<T> | onFailed(QObject *context, Function &&handler)
QFuture<ResultType<Function>> | then(QObject *context, Function &&function)

Class QHash:

qsizetype | erase_if(QHash<Key, T> &hash, Predicate pred)
qsizetype | removeIf(Predicate pred)

Class QList:

qsizetype | erase(QList<T> &list, const AT &t)
qsizetype | erase_if(QList<T> &list, Predicate pred)
qsizetype | removeIf(Predicate pred)

Class QLocale:

QLocale::Script | codeToScript(QStringView scriptCode)
QString | scriptToCode(QLocale::Script script)

Class QMap:

qsizetype | erase_if(QMap<Key, T> &map, Predicate pred)
QMap::size_type | removeIf(Predicate pred)

Class QMetaType:

bool | hasRegisteredDataStreamOperators() const

Class QMultiMap:

qsizetype | erase_if(QMultiMap<Key, T> &map, Predicate pred)
QMultiMap::size_type | removeIf(Predicate pred)

Class QMultiHash:

qsizetype | erase_if(QMultiHash<Key, T> &hash, Predicate pred)
qsizetype | removeIf(Predicate pred)

Class QOperatingSystemVersion:

QVersionNumber | version() const

Class QSet:

qsizetype | erase_if(QSet<T> &set, Predicate pred)
QSet::iterator | insert(QSet::const_iterator it, const T &value)

Class QSocketNotifier:

bool | isValid() const
void | setSocket(qintptr socket)

Class QString:

QString::iterator | erase(QString::const_iterator first, QString::const_iterator last)
qsizetype | erase(QString &s, const T &t)
qsizetype | erase_if(QString &s, Predicate pred)
QString | fromUtf8(const char8_t *str)
QString & | removeIf(Predicate pred)

Class QStringView:

QStringView::const_iterator | constBegin() const
QStringView::const_iterator | constEnd() const
bool | contains(const QRegularExpression &re, QRegularExpressionMatch *rmatch) const
qsizetype | count(const QRegularExpression &re) const
qsizetype | indexOf(const QRegularExpression &re, qsizetype from, QRegularExpressionMatch *rmatch) const
qsizetype | lastIndexOf(const QRegularExpression &re, qsizetype from, QRegularExpressionMatch *rmatch) const

Class QUntypedBindable:

bool | isReadOnly() const
QUntypedPropertyBinding | takeBinding()

Class QVarLengthArray:

qsizetype | erase(QVarLengthArray<T, Prealloc> &array, const AT &t)
qsizetype | erase_if(QVarLengthArray<T, Prealloc> &array, Predicate pred)
qsizetype | removeAll(const AT &t)
qsizetype | removeIf(Predicate pred)
bool | removeOne(const AT &t)

Class QColorSpace:

void | setTransferFunction(const QList<uint16_t> &transferFunctionTable)
void | setTransferFunctions(const QList<uint16_t> &redTransferFunctionTable, const QList<uint16_t> &greenTransferFunctionTable, const QList<uint16_t> &blueTransferFunctionTable)
QColorSpace | withTransferFunction(const QList<uint16_t> &transferFunctionTable) const
QColorSpace | withTransferFunctions(const QList<uint16_t> &redTransferFunctionTable, const QList<uint16_t> &greenTransferFunctionTable, const QList<uint16_t> &blueTransferFunctionTable) const

Class QTextDocument:

QTextDocument::ResourceProvider | defaultResourceProvider()
QTextDocument::ResourceProvider | resourceProvider() const
void | setDefaultResourceProvider(const QTextDocument::ResourceProvider &provider)
void | setResourceProvider(const QTextDocument::ResourceProvider &provider)

Class QNetworkCookie:

QNetworkCookie::SameSite | sameSitePolicy() const
void | setSameSitePolicy(QNetworkCookie::SameSite sameSite)

Class QSslSocket:

QString | activeBackend()
QList<QString> | availableBackends()
QList<QSsl::ImplementedClass> | implementedClasses(const QString &backendName)
bool | isClassImplemented(QSsl::ImplementedClass cl, const QString &backendName)
bool | isFeatureSupported(QSsl::SupportedFeature ft, const QString &backendName)
bool | isProtocolSupported(QSsl::SslProtocol protocol, const QString &backendName)
bool | setActiveBackend(const QString &backendName)
QList<QSsl::SupportedFeature> | supportedFeatures(const QString &backendName)
QList<QSsl::SslProtocol> | supportedProtocols(const QString &backendName)

Class QSGOpenGLTexture:

QSGTexture * | fromNativeExternalOES(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options)

Class QJSEngine:

void | throwError(const QJSValue &error)

Class QJSPrimitiveValue:

bool | operator!=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
QJSPrimitiveValue | operator*(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
QJSPrimitiveValue | operator+(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
QJSPrimitiveValue | operator-(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
QJSPrimitiveValue | operator/(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
bool | operator<(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
bool | operator<=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
bool | operator==(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
bool | operator>(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
bool | operator>=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)

Class QQmlPropertyMap:

void | freeze()
void | insert(const QVariantHash &values)

Class QQuickGraphicsConfiguration:

QByteArrayList | preferredInstanceExtensions()

Class QLabel:

QTextDocument::ResourceProvider | resourceProvider() const
void | setResourceProvider(const QTextDocument::ResourceProvider &provider)

Class QLayout:

void | unsetContentsMargins()

Class QStyle:

QString | name() const

### New Functions in Namespaces

QFuture<T> | makeExceptionalFuture(std::exception_ptr exception)
QFuture<T> | makeExceptionalFuture(const QException &exception)
QFuture<T> | makeReadyFuture(const QList<T> &values)
QFuture<void> | makeReadyFuture()
QFuture<std::decay_t<T>> | makeReadyFuture(T &&value)

### New Global Functions

typename std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>, bool> | qAddOverflow(T v1, T v2, T *result)
auto | qHypot(Tx x, Ty y, Tz z)
auto | qHypot(Tx x, Ty y)
auto | qHypot(F first, Fs... rest)
typename std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>, bool> | qMulOverflow(T v1, T v2, T *result)
typename std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>, bool> | qSubOverflow(T v1, T v2, T *result)

### New Enum Types

enum class | SameSite { Default, None, Lax, Strict }
enum class | ImplementedClass { Key, Certificate, Socket, DiffieHellman, EllipticCurve, …, DtlsCookie }
enum class | SupportedFeature { CertificateVerification, ClientSideAlpn, ServerSideAlpn, Ocsp, Psk, …, Alerts }

### New Type Aliases

| ResourceProvider

### New Properties

- sortIndicatorClearable : const

### New Variables

| Android10
| Android11
| AndroidOreo_MR1
| AndroidPie

## Additions to Other Qt 6 Releases

- What's New in Qt 6.0