Qt 6.3 中的新类和函数

This page contains a comprehensive list of all new classes and functions introduced in Qt 6.3.

新类

O
QOpcUaDataValue
QOpcUaHistoryData
QOpcUaHistoryReadRawRequest
QOpcUaHistoryReadResponse
W
QWaylandPresentationTime
WhenAnyResult ( QtFuture )

新成员函数

QAbstract3DGraph :

(从 6.3 起) bool hasSeries (QAbstract3DSeries * series ) const

QBluetoothDeviceInfo :

(从 6.3 起) QMultiHash<QBluetoothUuid, QByteArray> serviceData () const
(从 6.3 起) QByteArray serviceData (const QBluetoothUuid & serviceId ) const
(从 6.3 起) QList<QBluetoothUuid> serviceIds () const
(从 6.3 起) bool setServiceData (const QBluetoothUuid & serviceId , const QByteArray & data )

QByteArray :

(从 6.3 起) bool isValidUtf8 () const

QByteArrayList :

(从 6.3 起) QByteArray join (QByteArrayView separator ) const

QByteArrayMatcher :

(从 6.3 起) qsizetype indexIn (QByteArrayView data , qsizetype from ) const

QByteArrayView :

(从 6.3 起) bool isValidUtf8 () const
(从 6.3 起) double toDouble (bool * ok ) const
(从 6.3 起) float toFloat (bool * ok ) const
(从 6.3 起) int toInt (bool * ok , int base ) const
(从 6.3 起) long toLong (bool * ok , int base ) const
(从 6.3 起) qlonglong toLongLong (bool * ok , int base ) const
(从 6.3 起) short toShort (bool * ok , int base ) const
(从 6.3 起) uint toUInt (bool * ok , int base ) const
(从 6.3 起) ulong toULong (bool * ok , int base ) const
(从 6.3 起) qulonglong toULongLong (bool * ok , int base ) const
(从 6.3 起) ushort toUShort (bool * ok , int base ) const
(从 6.3 起) QByteArrayView trimmed () const

QCborArray :

(从 6.3 起) QCborArray fromJsonArray (QJsonArray && array )

QCborMap :

(从 6.3 起) QCborMap fromJsonObject (QJsonObject && obj )

QCollator :

(从 6.3 起) int defaultCompare (QStringView s1 , QStringView s2 )
(从 6.3 起) QCollatorSortKey defaultSortKey (QStringView key )

QCryptographicHash :

(从 6.3 起) QByteArrayView resultView () const

QDebug :

(从 6.3 起) QDebug operator<< (QDebug debug , const QVarLengthArray<T, P> & array )

QDir :

(从 6.3 起) bool mkdir (const QString & dirName , QFileDevice::Permissions permissions ) const

QDirIterator :

(从 6.3 起) QFileInfo nextFileInfo ()

QDoubleValidator :

(从 6.3 起) virtual void fixup (QString & input ) const override

QFile :

(从 6.3 起) std::filesystem::path filesystemSymLinkTarget () const
(从 6.3 起) std::filesystem::path filesystemSymLinkTarget (const std::filesystem::path & fileName )
(从 6.3 起) bool open (QIODeviceBase::OpenMode mode , QFileDevice::Permissions permissions )

QFontComboBox :

(从 6.3 起) std::optional<QFont> displayFont (const QString & fontFamily ) const
(从 6.3 起) QString sampleTextForFont (const QString & fontFamily ) const
(从 6.3 起) QString sampleTextForSystem (QFontDatabase::WritingSystem writingSystem ) const
(从 6.3 起) void setDisplayFont (const QString & fontFamily , const QFont & font )
(从 6.3 起) void setSampleTextForFont (const QString & fontFamily , const QString & sampleText )
(从 6.3 起) void setSampleTextForSystem (QFontDatabase::WritingSystem writingSystem , const QString & sampleText )

QFontMetrics :

(从 6.3 起) QRect boundingRect (const QString & text , const QTextOption & option ) const
(从 6.3 起) int horizontalAdvance (const QString & text , const QTextOption & option ) const
(从 6.3 起) QRect tightBoundingRect (const QString & text , const QTextOption & option ) const

QFontMetricsF :

(从 6.3 起) QRectF boundingRect (const QString & text , const QTextOption & option ) const
(从 6.3 起) qreal horizontalAdvance (const QString & text , const QTextOption & option ) const
(从 6.3 起) QRectF tightBoundingRect (const QString & text , const QTextOption & option ) const

QInputDevice :

(从 6.3 起) QStringList seatNames ()

QLatin1StringView :

(从 6.3 起) qsizetype lastIndexOf (QChar ch , Qt::CaseSensitivity cs ) const

QLocalServer :

(从 6.3 起) int listenBacklogSize () const
(从 6.3 起) void setListenBacklogSize (int size )

QLocale :

(从 6.3 起) QLocale::Language codeToLanguage (QStringView languageCode , QLocale::LanguageCodeTypes codeTypes )
(从 6.3 起) QString languageToCode (QLocale::Language 语言 , QLocale::LanguageCodeTypes codeTypes )

QEGLContext :

(从 6.3 起) virtual EGLConfig config () const = 0
(从 6.3 起) virtual EGLDisplay display () const = 0

QNetworkInformation :

(从 6.3 起) bool loadDefaultBackend ()
(从 6.3 起) QNetworkInformation::Features supportedFeatures () const

QNetworkReply :

(从 6.3 起) void requestSent ()
(从 6.3 起) void socketStartedConnecting ()

QObject :

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

QOpcUaClient :

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

QOpcUaLocalizedText :

(从 6.3 起) QDebug operator<< (QDebug debug , const QOpcUaLocalizedText & text )

QOpcUaNode :

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

QOpcUaQualifiedName :

(从 6.3 起) QDebug operator<< (QDebug debug , const QOpcUaQualifiedName & name )

QProcessEnvironment :

(从 6.3 起) bool inheritsFromParent () const

QQuickItem :

(从 6.3 起) void dumpItemTree () const
(从 6.3 起) void ensurePolished ()

QQuickRenderTarget :

(从 6.3 起) qreal devicePixelRatio () const
(从 6.3 起) void setDevicePixelRatio (qreal ratio )

QRegularExpressionMatch :

(从 6.3 起) bool hasCaptured (QAnyStringView name ) const
(从 6.3 起) bool hasCaptured (int nth ) const

QSemaphore :

(从 6.3 起) bool tryAcquire (int n , std::chrono::duration<Rep, Period> timeout )
(从 6.3 起) bool try_acquire ()
(从 6.3 起) bool try_acquire_for (const std::chrono::duration<Rep, Period> & timeout )
(从 6.3 起) bool try_acquire_until (const std::chrono::time_point<Clock, Duration> & tp )

QString :

(从 6.3 起) qsizetype lastIndexOf (QChar ch , Qt::CaseSensitivity cs ) const

QStringView :

(从 6.3 起) qsizetype lastIndexOf (QChar ch , Qt::CaseSensitivity cs ) const

QTableWidgetSelectionRange :

(从 6.3 起) bool operator!= (const QTableWidgetSelectionRange & lhs , const QTableWidgetSelectionRange & rhs )
(从 6.3 起) bool operator== (const QTableWidgetSelectionRange & lhs , const QTableWidgetSelectionRange & rhs )

QTcpServer :

(从 6.3 起) int listenBacklogSize () const
(从 6.3 起) void setListenBacklogSize (int size )

QThreadPool :

(从 6.3 起) void startOnReservedThread (QRunnable * runnable )
(从 6.3 起) void startOnReservedThread (Callable && callableToRun )

QUrl :

(从 6.3 起) QString fromAce (const QByteArray & domain , QUrl::AceProcessingOptions options )
(从 6.3 起) QByteArray toAce (const QString & domain , QUrl::AceProcessingOptions options )

QUtf8StringView :

(从 6.3 起) bool isValidUtf8 () const

QVarLengthArray :

(从 6.3 起) QVarLengthArray<T, Prealloc>::iterator emplace (QVarLengthArray<T, Prealloc>::const_iterator pos , Args &&... args )
(从 6.3 起) T & emplace_back (Args &&... args )

QWidget :

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

名称空间中的新函数

(从 6.3 起) void failOnWarning (const char * message )
(从 6.3 起) void failOnWarning (const QRegularExpression & messagePattern )
(从 6.3 起) QFuture<OutputSequence> whenAll (InputIt first , InputIt last )
(从 6.3 起) QFuture<OutputSequence> whenAll (Futures &&... futures )
(从 6.3 起) QFuture<QtFuture::WhenAnyResult<T>> whenAny (InputIt first , InputIt last )
(从 6.3 起) QFuture<std::variant<std::decay_t<Futures>...>> whenAny (Futures &&... futures )

新全局函数

(从 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 起) 枚举类 TransportMedium { Unknown, Ethernet, Cellular, WiFi, Bluetooth }
(从 6.3 起) enum 初始化 { InheritFromParent }
(从 6.3 起) enum AceProcessingOption { IgnoreIDNWhitelist, AceTransitionalProcessing }

新枚举值

枚举值 Language::Kaingang
枚举值 Language::Nheengatu
枚举值 PixelMetric::PM_LineEditIconMargin
枚举值 Script::Script_CyproMinoan
枚举值 Script::Script_NagMundari
枚举值 Script::Script_OldUyghur
枚举值 Script::Script_Tangsa
枚举值 Script::Script_Toto
枚举值 Script::Script_Vithkuqi
枚举值 StandardPixmap::SP_TabCloseButton
枚举值 StyleHint::SH_SpinBox_SelectOnStep
枚举值 UnicodeVersion::Unicode_14_0

新特性

新的变量

(从 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 类型

D
DynamicBurst3D
F
FolderDialog
M
MessageDialog
P
ParticleCustomShape3D
PresentationTime
Q
QtShell
QtShellChrome
QtShellSurface
T
TreeView
TreeViewDelegate

新 QML 特性

QML 类型 Bar3DSeries :

(从 6.3 起) rowColors : list<ThemeColor>

QML 类型 Bars3D :

(从 6.3 起) barSeriesMargin : size

QML 类型 FileInstancing :

(从 6.3 起) instanceCount : int

QML 类型 HeightMapSurfaceDataProxy :

(从 6.3 起) autoScaleY : real
(从 6.3 起) maxYValue : real
(从 6.3 起) minYValue : real

QML 类型 HoverHandler :

(从 6.3 起) blocking : bool

QML 类型 InstanceList :

(从 6.3 起) instanceCount : int

QML 类型 ParticleSystem3DLogging :

(从 6.3 起) timeDeviation : real

QML 类型 SpriteParticle3D :

(从 6.3 起) lights : list<Light>
(从 6.3 起) offsetX : real
(从 6.3 起) offsetY : real

QML 类型 Surface3DSeries :

(从 6.3 起) wireframeColor : color

QML 类型 TextMetrics :

(从 6.3 起) renderType : enumeration

QML 类型 WheelHandler :

(从 6.3 起) blocking : bool

新 QML 方法

QML 类型 AbstractGraph3D :

(从 6.3 起) bool hasSeries (Abstract3DSeries series )

QML 类型 Instancing :

(从 6.3 起) color instanceColor (int index )
(从 6.3 起) vector3d instanceCustomData (int index )
(从 6.3 起) vector3d instancePosition (int index )
(从 6.3 起) quaternion instanceRotation (int index )
(从 6.3 起) vector3d instanceScale (int index )

QML 类型 Item :

(从 6.3 起) dumpItemTree ()

QML 类型 TestCase :

(从 6.3 起) failOnWarning ( message )