Qt 6.1 中新引入的类和函数

本页包含 Qt 6.1 中引入的所有新类和函数的完整列表。

新类

新成员函数

QByteArray

(自 6.1) QByteArray::iteratorerase(QByteArray::const_iterator first, QByteArray::const_iterator last)
(自 6.1) qsizetypeerase(QByteArray &ba, const T &t)
(自 6.1) qsizetypeerase_if(QByteArray &ba, Predicate pred)
(自 6.1) QByteArray &removeIf(Predicate pred)

QColorSpace

(自 6.1) voidsetTransferFunction(const QList<uint16_t> &transferFunctionTable)
(自 6.1) voidsetTransferFunctions(const QList<uint16_t> &redTransferFunctionTable, const QList<uint16_t> &greenTransferFunctionTable, const QList<uint16_t> &blueTransferFunctionTable)
(自 6.1) QColorSpacewithTransferFunction(const QList<uint16_t> &transferFunctionTable) const
(自 6.1) QColorSpacewithTransferFunctions(const QList<uint16_t> &redTransferFunctionTable, const QList<uint16_t> &greenTransferFunctionTable, const QList<uint16_t> &blueTransferFunctionTable) const

QFuture

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

QHash

(自 6.1) qsizetyperemoveIf(Predicate pred)

QJSEngine

(自 6.1) voidthrowError(const QJSValue &error)

QJSPrimitiveValue

(自 6.1) booloperator!=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) QJSPrimitiveValueoperator*(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) QJSPrimitiveValueoperator+(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) QJSPrimitiveValueoperator-(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) QJSPrimitiveValueoperator/(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) booloperator<(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) booloperator<=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) booloperator==(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) booloperator>(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)
(自 6.1) booloperator>=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs)

QLabel

(自6.1开始) QTextDocument::ResourceProviderresourceProvider() const
(自 6.1) voidsetResourceProvider(const QTextDocument::ResourceProvider &provider)

QLayout

(自 6.1) voidunsetContentsMargins()

QList

(自 6.1) qsizetypeerase_if(QList<T> &list, Predicate pred)
(自 6.1) qsizetyperemoveIf(Predicate pred)

QLocale

(自6.1开始) QLocale::ScriptcodeToScript(QStringView scriptCode)
(自6.1开始) QStringscriptToCode(QLocale::Script script)

QMap

(自6.1开始) QMap<Key, T>::size_typeremoveIf(Predicate pred)

QMetaType

(自 6.1) boolhasRegisteredDataStreamOperators() const

QMultiHash

(自 6.1) qsizetyperemoveIf(Predicate pred)

QMultiMap

(自6.1开始) QMultiMap<Key, T>::size_typeremoveIf(Predicate pred)

QSGOpenGLTexture

(自6.1开始) QSGTexture *fromNativeExternalOES(GLuint textureId, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options)

QNetworkCookie

(自6.1开始) QNetworkCookie::SameSitesameSitePolicy() const
(自 6.1) voidsetSameSitePolicy(QNetworkCookie::SameSite sameSite)

QOperatingSystemVersion

(自6.1开始) QVersionNumberversion() const

QQmlPropertyMap

(自 6.1) voidfreeze()
(自 6.1) voidinsert(const QVariantHash &values)

QQuickGraphicsConfiguration

(自6.1开始) QByteArrayListpreferredInstanceExtensions()

QSet

(自6.1开始) QSet<T>::iteratorinsert(QSet<T>::const_iterator it, const T &value)
(自 6.1) qsizetyperemoveIf(Pred pred)

QSocketNotifier

(自 6.1) boolisValid() const
(自 6.1) voidsetSocket(qintptr socket)

QSslSocket

(自6.1开始) QStringactiveBackend()
(自6.1起) QList<QString>availableBackends()
(自6.1起) QList<QSsl::ImplementedClass>implementedClasses(const QString &backendName)
(自 6.1) boolisClassImplemented(QSsl::ImplementedClass cl, const QString &backendName)
(自 6.1) boolisFeatureSupported(QSsl::SupportedFeature ft, const QString &backendName)
(自 6.1) boolisProtocolSupported(QSsl::SslProtocol protocol, const QString &backendName)
(自 6.1) boolsetActiveBackend(const QString &backendName)
(自6.1起) QList<QSsl::SupportedFeature>supportedFeatures(const QString &backendName)
(自6.1起) QList<QSsl::SslProtocol>supportedProtocols(const QString &backendName)

QString

(自6.1起) QString::iteratorerase(QString::const_iterator first, QString::const_iterator last)
(自 6.1) qsizetypeerase(QString &s, const T &t)
(自 6.1) qsizetypeerase(QList<T> &list, const AT &t)
(自 6.1) qsizetypeerase_if(QString &s, Predicate pred)
(自 6.1) qsizetypeerase_if(QHash<Key, T> &hash, Predicate pred)
(自 6.1) qsizetypeerase_if(QMultiHash<Key, T> &hash, Predicate pred)
(自 6.1) qsizetypeerase_if(QMap<Key, T> &map, Predicate pred)
(自 6.1) qsizetypeerase_if(QMultiMap<Key, T> &map, Predicate pred)
(自 6.1) qsizetypeerase_if(QSet<T> &set, Predicate pred)
(自6.1开始) QStringfromUtf8(const char8_t *str)
(自6.1起) QString &removeIf(Predicate pred)

QStringView

(自6.1起) QStringView::const_iteratorconstBegin() const
(自6.1起) QStringView::const_iteratorconstEnd() const
(自 6.1) boolcontains(const QRegularExpression &re, QRegularExpressionMatch *rmatch) const
(自 6.1) qsizetypecount(const QRegularExpression &re) const
(自 6.1) qsizetypeindexOf(const QRegularExpression &re, qsizetype from, QRegularExpressionMatch *rmatch) const
(自 6.1) qsizetypelastIndexOf(const QRegularExpression &re, qsizetype from, QRegularExpressionMatch *rmatch) const

QStyle

(自6.1开始) QStringname() const

QTextDocument

(自6.1开始) QTextDocument::ResourceProviderdefaultResourceProvider()
(自6.1开始) QTextDocument::ResourceProviderresourceProvider() const
(自 6.1) voidsetDefaultResourceProvider(const QTextDocument::ResourceProvider &provider)
(自 6.1) voidsetResourceProvider(const QTextDocument::ResourceProvider &provider)

QUntypedBindable

(自 6.1) boolisReadOnly() const
(自6.1起) QUntypedPropertyBindingtakeBinding()

QVarLengthArray

(自 6.1) qsizetypeerase(QVarLengthArray<T, Prealloc> &array, const AT &t)
(自 6.1) qsizetypeerase_if(QVarLengthArray<T, Prealloc> &array, Predicate pred)
(自 6.1) qsizetyperemoveAll(const AT &t)
(自 6.1) qsizetyperemoveIf(Predicate pred)
(自 6.1) boolremoveOne(const AT &t)

命名空间中的新函数

(自 6.1) QFuture<T>makeExceptionalFuture(std::__exception_ptr::exception_ptr exception)
(自 6.1) QFuture<T>makeExceptionalFuture(const QException &exception)

新全局函数

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

新枚举类型

(自 6.1) enum classSameSite { Default, None, Lax, Strict }
(自 6.1) enum classImplementedClass { Key, Certificate, Socket, DiffieHellman, EllipticCurve, …, DtlsCookie }
(自 6.1) enum classSupportedFeature { CertificateVerification, ClientSideAlpn, ServerSideAlpn, Ocsp, Psk, …, Alerts }

新类型别名

(自 6.1) ResourceProvider

新属性

新变量

(自 6.1) Android10
(自 6.1) Android11
(自 6.1) AndroidOreo_MR1
(自 6.1) AndroidPie

© 2024 The Qt Company Ltd. 本文档中的贡献均为各自版权所有者的财产。本提供在此的文档是根据自由软件基金会发布的 GNU 自由文档许可证版本 1.3 的条款许可的。Qt 及其相应的标志是 The Qt Company Ltd. 在芬兰和/或世界其他国家的商标。所有其他商标都是各自所有者的财产。