Qt 6.3 中的新类和函数

本页包含 Qt 6.3 中引入的所有新类和函数的全面列表。

新类

新成员函数

QAbstract3DGraph

(自 6.3) boolhasSeries(QAbstract3DSeries *series) const

QBluetoothDeviceInfo

(自 6.3) QByteArrayserviceData(const QBluetoothUuid &serviceId) const
(自 6.3) QMultiHash<QBluetoothUuid, QByteArray>serviceData() const
(自 6.3) QList<QBluetoothUuid>serviceIds() const
(自 6.3) boolsetServiceData(const QBluetoothUuid &serviceId, const QByteArray &data)

QByteArray

(自 6.3) boolisValidUtf8() const

QByteArrayList

(自 6.3) QByteArrayjoin(QByteArrayView separator) const

QByteArrayMatcher

(自 6.3) qsizetypeindexIn(QByteArrayView data, qsizetype from) const

QByteArrayView

(自 6.3) boolisValidUtf8() const
(自 6.3) doubletoDouble(bool *ok) const
(自 6.3) floattoFloat(bool *ok) const
(自 6.3) inttoInt(bool *ok, int base) const
(自 6.3) longtoLong(bool *ok, int base) const
(自 6.3) qlonglongtoLongLong(bool *ok, int base) const
(自6.3起) 短整型toShort(bool *ok, int base) const
(自6.3起) 无符号整型toUInt(bool *ok, int base) const
(自6.3起) 无符号长整型toULong(bool *ok, int base) const
(自6.3起) qulonglongtoULongLong(bool *ok, int base) const
(自6.3起) ushorttoUShort(bool *ok, int base) const
(自6.3起) QByteArrayViewtrimmed() const

QCborArray

(自6.3起) QCborArrayfromJsonArray(QJsonArray &&array)

QCborMap

(自6.3起) QCborMapfromJsonObject(QJsonObject &&obj)

QCollator

(自 6.3) intdefaultCompare(QStringView s1, QStringView s2)
(自6.3起) QCollatorSortKeydefaultSortKey(QStringView key)

QCryptographicHash

(自6.3起) QByteArrayViewresultView() const

QDir

(自 6.3) boolmkdir(const QString &dirName, QFileDevice::Permissions permissions) const

QDirIterator

(自6.3起) QFileInfonextFileInfo()

QDoubleValidator

(自6.3起) 虚拟 voidfixup(QString &input) const override

QFile

(自6.3起) std::filesystem::pathfilesystemSymLinkTarget() const
(自6.3起) std::filesystem::pathfilesystemSymLinkTarget(const std::filesystem::path &fileName)
(自 6.3) boolopen(QIODeviceBase::OpenMode mode, QFileDevice::Permissions permissions)

QFontComboBox

(自6.3起) std::optional<QFont>displayFont(const QString &fontFamily) const
(自6.3起) QStringsampleTextForFont(const QString &fontFamily) const
(自6.3起) QStringsampleTextForSystem(QFontDatabase::WritingSystem writingSystem) const
(自6.3起) voidsetDisplayFont(const QString &fontFamily, const QFont &font)
(自6.3起) voidsetSampleTextForFont(const QString &fontFamily, const QString &sampleText)
(自6.3起) voidsetSampleTextForSystem(QFontDatabase::WritingSystem writingSystem, const QString &sampleText)

QFontMetrics

(自6.3起) QRectboundingRect(const QString &text, const QTextOption &option) const
(自 6.3) inthorizontalAdvance(const QString &text, const QTextOption &option) const
(自6.3起) QRecttightBoundingRect(const QString &text, const QTextOption &option) const

QFontMetricsF

(自6.3起) QRectFboundingRect(const QString &text, const QTextOption &option) const
(自6.3起) qrealhorizontalAdvance(const QString &text, const QTextOption &option) const
(自6.3起) QRectFtightBoundingRect(const QString &text, const QTextOption &option) const

QInputDevice

(自6.3起) QStringListseatNames()

QKeyCombination

(自6.3起) QDebugoperator<<(QDebug debug, const QVarLengthArray<T, P> &array)

QLatin1StringView

(自 6.3) qsizetypelastIndexOf(QChar ch, Qt::CaseSensitivity cs) const

QLocalServer

(自 6.3) intlistenBacklogSize() const
(自6.3起) voidsetListenBacklogSize(int size)

QLocale

(自6.3起) QLocale::LanguagecodeToLanguage(QStringView languageCode, QLocale::LanguageCodeTypes codeTypes)
(自6.3起) QStringlanguageToCode(QLocale::Language language, QLocale::LanguageCodeTypes codeTypes)

QEGLContext

(自6.3起) virtual EGLConfigconfig() const = 0
(自6.3起) virtual EGLDisplaydisplay() const = 0

QNetworkInformation

(自 6.3) boolloadDefaultBackend()
(自6.3起) QNetworkInformation::FeaturessupportedFeatures() const

QNetworkReply

(自6.3起) voidrequestSent()
(自6.3起) voidsocketStartedConnecting()

QObject

(自6.3起) QList<T>findChildren(Qt::FindChildOptions options) const

QOpcUaClient

(自6.3起) QOpcUaHistoryReadResponse *readHistoryData(const QOpcUaHistoryReadRawRequest &request)

QOpcUaLocalizedText

(自6.3起) QDebugoperator<<(QDebug debug, const QOpcUaLocalizedText &text)

QOpcUaNode

(自6.3起) QOpcUaHistoryReadResponse *readHistoryRaw(const QDateTime &startTime, const QDateTime &endTime, quint32 numValues, bool returnBounds)

QOpcUaQualifiedName

(自6.3起) QDebugoperator<<(QDebug debug, const QOpcUaQualifiedName &name)

QProcessEnvironment

(自 6.3) boolinheritsFromParent() const

QQuickItem

(自6.3起) voiddumpItemTree() const
(自6.3起) voidensurePolished()

QQuickRenderTarget

(自6.3起) qrealdevicePixelRatio() const
(自6.3起) voidsetDevicePixelRatio(qreal ratio)

QRegularExpressionMatch

(自 6.3) boolhasCaptured(const QString &name) const
(自 6.3) boolhasCaptured(QStringView name) const
(自 6.3) boolhasCaptured(int nth) const

QSemaphore

(自 6.3) booltryAcquire(int n, std::chrono::duration<Rep, Period> timeout)
(自 6.3) booltry_acquire()
(自 6.3) booltry_acquire_for(const std::chrono::duration<Rep, Period> &timeout)
(自 6.3) booltry_acquire_until(const std::chrono::time_point<Clock, Duration> &tp)

QString

(自 6.3) qsizetypelastIndexOf(QChar c, Qt::CaseSensitivity cs) const

QStringView

(自 6.3) qsizetypelastIndexOf(QChar c, Qt::CaseSensitivity cs) const

QTableWidgetSelectionRange

(自 6.3) booloperator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
(自 6.3) booloperator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)

QTcpServer

(自 6.3) intlistenBacklogSize() const
(自6.3起) voidsetListenBacklogSize(int size)

QThreadPool

(自6.3起) voidstartOnReservedThread(QRunnable *runnable)
(自6.3起) voidstartOnReservedThread(Callable &&callableToRun)

QUrl

(自6.3起) QStringfromAce(const QByteArray &domain, QUrl::AceProcessingOptions options)
(自 6.3) QByteArraytoAce(const QString &domain, QUrl::AceProcessingOptions options)

QUtf8StringView

(自 6.3) boolisValidUtf8() const

QVarLengthArray

(since 6.3) QVarLengthArray<T, Prealloc>::iteratoremplace(QVarLengthArray<T, Prealloc>::const_iterator pos, Args &&... args)
(since 6.3) T &emplace_back(Args &&... args)

QWidget

(since 6.3) QAction *addAction(const QString &text)
(since 6.3) QAction *addAction(const QIcon &icon, const QString &text)
(since 6.3) QAction *addAction(const QString &text, const QObject *receiver, const char *member, Qt::ConnectionType type)
(since 6.3) QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char *member, Qt::ConnectionType type)
(since 6.3) QAction *addAction(const QString &text, Args &&... args)
(since 6.3) QAction *addAction(const QIcon &icon, const QString &text, Args &&... args)
(since 6.3) QAction *addAction(const QString &text, const QKeySequence &shortcut)
(since 6.3) QAction *addAction(const QIcon &icon, const QString &text, const QKeySequence &shortcut)
(since 6.3) QAction *addAction(const QString &text, const QKeySequence &shortcut, const QObject *receiver, const char *member, Qt::ConnectionType type)
(since 6.3) QAction *addAction(const QIcon &icon, const QString &text, const QKeySequence &shortcut, const QObject *receiver, const char *member, Qt::ConnectionType type)
(since 6.3) QAction *addAction(const QString &text, const QKeySequence &shortcut, Args &&... args)
(since 6.3) QAction *addAction(const QIcon &icon, const QString &text, const QKeySequence &shortcut, Args &&... args)

命名空间中的新功能

(自6.3起) voidfailOnWarning(const char *message)
(自6.3起) voidfailOnWarning(const QRegularExpression &messagePattern)
(自6.3以来) QFuture<输出序列>whenAll(Futures &&... )
(自6.3以来) QFuture<输出序列>whenAll(InputIt first, InputIt last)
(自6.3以来) QFuture...>>whenAny(Futures &&... futures)
(自6.3以来) QFuture>whenAny(InputIt first, InputIt last)

新全局函数

(自6.3以来) const char *qWebEngineChromiumSecurityPatchVersion()

新宏

(自6.3以来) QT_TRID_N_NOOP(id)
(自6.3以来) QVERIFY_THROWS_EXCEPTION(exceptiontype, ...)
(自6.3以来) QVERIFY_THROWS_NO_EXCEPTION(...)
(自6.3以来) Q_APPLICATION_STATIC(Type, VariableName, ...)
(自6.3以来) Q_GADGET_EXPORT(EXPORT_MACRO)

新枚举类型

(自6.3以来) enum classTransportMedium { Unknown, Ethernet, Cellular, WiFi, Bluetooth }
(自6.3以来) enumInitialization { InheritFromParent }
(自6.3以来) enumAceProcessingOption { IgnoreIDNWhitelist, AceTransitionalProcessing }

新枚举值

新属性

新变量

(自6.3以来) MacOSMonterey
(自6.3以来) Windows10_1809
(自6.3以来) Windows10_1903
(自6.3以来) Windows10_1909
(自6.3以来) Windows10_2004
(自6.3以来) Windows10_20H2
(自6.3以来) Windows10_21H1
(自6.3以来) Windows10_21H2
(自6.3以来) Windows11

新 QML 类型

新 QML 属性

QML 类型 Bar3DSeries

(自6.3以来) rowColors : 列表

QML 类型 Bars3D

(自6.3以来) barSeriesMargin : 大小

QML 类型 FileInstancing

(自6.3以来) instanceCount : 整数

QML 类型 HeightMapSurfaceDataProxy

(自6.3以来) autoScaleY : 实数
(自6.3以来) maxYValue : 实数
(自6.3以来) minYValue : 实数

QML 类型 HoverHandler

(自6.3以来) blocking : 布尔型

QML 类型 InstanceList

(自6.3以来) instanceCount : 整数

QML 类型 ParticleSystem3DLogging

(自6.3以来) timeDeviation : 实数

QML 类型 SpriteParticle3D

(自6.3以来) lights : 列表
(自6.3以来) offsetX : 单位浮点数
(自6.3以来) offsetY : 单位浮点数

QML 类型 Surface3DSeries

(自6.3以来) wireframeColor : 颜色

QML 类型 TextMetrics

(自6.3以来) renderType : 枚举类型

QML 类型 WheelHandler

(自6.3以来) blocking : 布尔型

新的 QML 方法

QML 类型 AbstractGraph3D

(自 6.3) boolhasSeries(Abstract3DSeries 系列)

QML 类型 Instancing

(自 6.3) 颜色instanceColor(int 索引)
(自 6.3) vector3dinstanceCustomData(int 索引)
(自 6.3) vector3dinstancePosition(int 索引)
(自 6.3) quaternioninstanceRotation(int 索引)
(自 6.3) vector3dinstanceScale(int 索引)

QML 类型 Item

(自6.3以来) dumpItemTree()

QML 类型 TestCase

(自6.3以来) failOnWarning(信息)

© 2024 The Qt Company Ltd. 本文件中的文档贡献归其各自所有者所有。提供的文档受 GNU 自由文档许可证版本 1.3 的条款约束,由自由软件基金会发布。Qt 及其标志是 The Qt Company Ltd. 在芬兰及/或其他国家的商标。所有其他商标属于其各自所有者。