Qt 6.9 的新类和新函数

本页包含 Qt 6.9 引入的所有新类和函数的综合列表。

新类

F
QFontVariableAxis
H
QHttpServerConfiguration
N
NativeShadingRateMap ( QRhiShadingRateMap )
O
QOAuth2DeviceAuthorizationFlow
P
PrimaryPoints ( QColorSpace )
QPainterStateGuard
R
QRhiShadingRateMap
QRhiVulkanQueueSubmitParams
S
QSpline3DSeries
T
TryEmplaceResult ( QHash )
W
QWebEngineProfileBuilder

新成员函数

类 QAbstractHttpServer :

(从 6.9 起) QHttpServerConfiguration configuration () const
(从 6.9 起) void setConfiguration (const QHttpServerConfiguration & config )

类 QAbstractOAuth2 :

(从 6.9 起) void accessTokenAboutToExpire ()
(从 6.9 起) void refreshTokens ()
(从 6.9 起) void refreshTokensImplementation ()
(从 6.9 起) void serverReportedErrorOccurred (const QString & error , const QString & errorDescription , const QUrl & uri )
(从 6.9 起) void setNetworkRequestModifier (const QAbstractOAuth2::ContextTypeForFunctor<Functor> * context , Functor && callback )

类 QAnyStringView :

(从 6.9 起) QString arg (Args &&... args ) const

类 QBrush :

(从 6.9 起) QBrush & operator= (QColor color )
(从 6.9 起) QBrush & operator= (Qt::BrushStyle style )
(从 6.9 起) QBrush & operator= (Qt::GlobalColor color )

类 QByteArray :

(从 6.9 起) QByteArray operator+ (QByteArrayView lhs , const QByteArray & rhs )
(从 6.9 起) QByteArray operator+ (const QByteArray & lhs , QByteArrayView rhs )

类 QColorSpace :

(从 6.9 起) QColorSpace::PrimaryPoints primaryPoints () const
(从 6.9 起) void setPrimaryPoints (const QColorSpace::PrimaryPoints & primaryPoints )

类 QCommandLineParser :

(从 6.9 起) void showMessageAndExit (QCommandLineParser::MessageType type , const QString & message , int exitCode )

类 QDebug :

(从 6.9 起) QDebug & operator<< (const std::tuple<Ts...> & tuple )
(从 6.9 起) QDebug operator<< (QDebug debug , T t )
(从 6.9 起) QDebug operator<< (QDebug debug , const std::array<T, N> & array )
(从 6.9 起) QDebug operator<< (QDebug debug , const std::multiset<Key, Compare, Alloc> & multiset )
(从 6.9 起) QDebug operator<< (QDebug debug , const std::set<Key, Compare, Alloc> & set )
(从 6.9 起) QDebug operator<< (QDebug debug , const std::unordered_map<Key, T, Hash, KeyEqual, Alloc> & map )
(从 6.9 起) QDebug operator<< (QDebug debug , const std::unordered_set<Key, Hash, KeyEqual, Alloc> & unordered_set )
(从 6.9 起) QByteArray toBytes (const T & object )

类 QDockWidget :

(从 6.9 起) void setDockLocation (Qt::DockWidgetArea area )

类 QDomNodeList :

(从 6.9 起) QDomNodeList::const_iterator begin () const
(从 6.9 起) QDomNodeList::const_iterator cbegin () const
(从 6.9 起) QDomNodeList::const_iterator cend () const
(从 6.9 起) QDomNodeList::const_iterator constBegin () const
(从 6.9 起) QDomNodeList::const_iterator constEnd () const
(从 6.9 起) QDomNodeList::const_reverse_iterator crbegin () const
(从 6.9 起) QDomNodeList::const_reverse_iterator crend () const
(从 6.9 起) QDomNodeList::const_iterator end () const
(从 6.9 起) QDomNodeList::const_reverse_iterator rbegin () const
(从 6.9 起) QDomNodeList::const_reverse_iterator rend () const

类 QFile :

(从 6.9 起) bool supportsMoveToTrash ()

类 QFontDatabase :

(从 6.9 起) void addApplicationEmojiFontFamily (const QString & familyName )
(从 6.9 起) QStringList applicationEmojiFontFamilies ()
(从 6.9 起) bool removeApplicationEmojiFontFamily (const QString & familyName )
(从 6.9 起) void setApplicationEmojiFontFamilies (const QStringList & familyNames )

类 QFontInfo :

(从 6.9 起) QList<QFontVariableAxis> variableAxes () const

类 QHash :

(从 6.9 起) QHash<Key, T>::TryEmplaceResult insertOrAssign (K && key , Value && value )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult insertOrAssign (Key && key , Value && value )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult insertOrAssign (const Key & key , Value && value )
(从 6.9 起) std::pair<QHash<Key, T>::key_value_iterator, bool> insert_or_assign (K && key , Value && value )
(从 6.9 起) std::pair<QHash<Key, T>::key_value_iterator, bool> insert_or_assign (Key && key , Value && value )
(从 6.9 起) std::pair<QHash<Key, T>::key_value_iterator, bool> insert_or_assign (const Key & key , Value && value )
(从 6.9 起) QHash<Key, T>::key_value_iterator insert_or_assign (QHash<Key, T>::const_iterator hint , K && key , Value && value )
(从 6.9 起) QHash<Key, T>::key_value_iterator insert_or_assign (QHash<Key, T>::const_iterator hint , Key && key , Value && value )
(从 6.9 起) QHash<Key, T>::key_value_iterator insert_or_assign (QHash<Key, T>::const_iterator hint , const Key & key , Value && value )
(从 6.9 起) size_t qHash (T key , size_t seed )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult tryEmplace (K && key , Args &&... args )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult tryEmplace (Key && key , Args &&... args )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult tryEmplace (const Key & key , Args &&... args )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult tryInsert (K && key , const T & value )
(从 6.9 起) QHash<Key, T>::TryEmplaceResult tryInsert (const Key & key , const T & value )
(从 6.9 起) std::pair<QHash<Key, T>::key_value_iterator, bool> try_emplace (K && key , Args &&... args )
(从 6.9 起) std::pair<QHash<Key, T>::key_value_iterator, bool> try_emplace (Key && key , Args &&... args )
(从 6.9 起) std::pair<QHash<Key, T>::key_value_iterator, bool> try_emplace (const Key & key , Args &&... args )
(从 6.9 起) QHash<Key, T>::key_value_iterator try_emplace (QHash<Key, T>::const_iterator hint , K && key , Args &&... args )
(从 6.9 起) QHash<Key, T>::key_value_iterator try_emplace (QHash<Key, T>::const_iterator hint , Key && key , Args &&... args )
(从 6.9 起) QHash<Key, T>::key_value_iterator try_emplace (QHash<Key, T>::const_iterator hint , const Key & key , Args &&... args )

类 QHttp2Configuration :

(从 6.9 起) 无符号 int maxConcurrentStreams () const
(从 6.9 起) void setMaxConcurrentStreams (unsigned int value )

类 QIODevice :

(从 6.9 起) QByteArrayView readLineInto (QSpan<char> buffer )
(从 6.9 起) QByteArrayView readLineInto (QSpan<std::byte> buffer )
(从 6.9 起) QByteArrayView readLineInto (QSpan<uchar> buffer )
(从 6.9 起) bool readLineInto (QByteArray * line , qint64 maxSize )

类 QImage :

(从 6.9 起) void flip (Qt::Orientations orient )
(从 6.9 起) QImage flipped (Qt::Orientations orient ) &&
(从 6.9 起) QImage flipped (Qt::Orientations orient ) const &

类 QJniArray :

(从 6.9 起) QJniArray<T>::reference operator[] (QJniArrayBase::size_type i )

类 QJsonValue :

(从 6.9 起) QJsonValue fromJson (QByteArrayView json , QJsonParseError * error )
(从 6.9 起) QByteArray toJson (QJsonValue::JsonFormat format ) const

类 QLatin1StringView :

(从 6.9 起) QByteArray toUtf8 () const

类 QList :

(从 6.9 起) auto operator<=> (const QList<T> & lhs , const QList<T> & rhs )

类 QMediaMetaData :

(从 6.9 起) auto asKeyValueRange () const

类 QMetaEnum :

(从 6.9 起) bool is64Bit () const
(从 6.9 起) std::optional<quint64> keyToValue64 (const char * key ) const
(从 6.9 起) std::optional<quint64> value64 (int index ) const

类 QMetaMethod :

(从 6.9 起) QByteArrayView nameView () const

类 QOAuth2AuthorizationCodeFlow :

(从 6.9 起) void refreshTokensImplementation ()

类 QOAuth2DeviceAuthorizationFlow :

(从 6.9 起) void refreshTokensImplementation ()

类 QOAuthHttpServerReplyHandler :

(从 6.9 起) QString callbackHost () const
(从 6.9 起) void setCallbackHost (const QString & host )

类 QOAuthUriSchemeReplyHandler :

(从 6.9 起) bool handleAuthorizationRedirect (const QUrl & url )

类 QOpcUaAuthenticationInformation :

(从 6.9 起) void setCertificateAuthentication (const QString & certificatePath , const QString & privateKeyPath )

类 QPainter :

(从 6.9 起) void setBrush (QColor color )
(从 6.9 起) void setBrush (Qt::GlobalColor color )

类 QPdfWriter :

(从 6.9 起) QString author () const
(从 6.9 起) void setAuthor (const QString & author )

类 QPen :

(从 6.9 起) QPen & operator= (QColor color )
(从 6.9 起) QPen & operator= (Qt::PenStyle style )

类 QQuickWidget :

(从 6.9 起) void loadFromModule (QAnyStringView uri , QAnyStringView typeName )
(从 6.9 起) void setInitialProperties (const QVariantMap & initialProperties )

类 QRhi :

(从 6.9 起) QRhiShadingRateMap * newShadingRateMap ()
(从 6.9 起) void setQueueSubmitParams (QRhiNativeHandles * params )
(从 6.9 起) QList<QSize> supportedShadingRates (int sampleCount ) const

类 QRhiCommandBuffer :

(从 6.9 起) void setShadingRate (const QSize & coarsePixelSize )

类 QRhiSwapChain :

(从 6.9 起) void setShadingRateMap (QRhiShadingRateMap * map )
(从 6.9 起) QRhiShadingRateMap * shadingRateMap () const

类 QRhiTextureRenderTargetDescription :

(从 6.9 起) void setShadingRateMap (QRhiShadingRateMap * map )
(从 6.9 起) QRhiShadingRateMap * shadingRateMap () const

类 QSerialPort :

(从 6.9 起) void settingsRestoredOnCloseChanged (bool restore )

类 QShaderBaker :

(从 6.9 起) void setGlslOptions (QShaderBaker::GlslOptions options )

类 QSharedPointer :

(从 6.9 起) QSharedPointer<X> constCast () &&
(从 6.9 起) QSharedPointer<X> dynamicCast () &&
(从 6.9 起) QSharedPointer<X> objectCast () &&
(从 6.9 起) QSharedPointer<X> qSharedPointerCast (QSharedPointer<T> && other )
(从 6.9 起) QSharedPointer<X> qSharedPointerConstCast (QSharedPointer<T> && src )
(从 6.9 起) QSharedPointer<X> qSharedPointerDynamicCast (QSharedPointer<T> && src )
(从 6.9 起) QSharedPointer<X> qSharedPointerObjectCast (QSharedPointer<T> && src )
(从 6.9 起) QSharedPointer<X> staticCast () &&

类 QSortFilterProxyModel :

(从 6.9 起) void beginFilterChange ()

类 QSpan :

(从 6.9 起) void chop (QSpan<T, E>::size_type n )
(从 6.9 起) auto chopped (QSpan<T, E>::size_type n ) const
(从 6.9 起) void slice (QSpan<T, E>::size_type pos )
(从 6.9 起) void slice (QSpan<T, E>::size_type pos , QSpan<T, E>::size_type n )

类 QSqlDriver :

(从 6.9 起) QString connectionName () const

类 QSqlQueryModel :

(从 6.9 起) void refresh ()

类 QStackedLayout :

(从 6.9 起) void widgetAdded (int index )

类 QStackedWidget :

(从 6.9 起) void widgetAdded (int index )

类 QString :

(从 6.9 起) QString operator+ (QStringView lhs , const QString & rhs )
(从 6.9 起) QString operator+ (const QString & lhs , QStringView rhs )
(从 6.9 起) QString & setUnicode (const char16_t * unicode , qsizetype size )
(从 6.9 起) QString & setUtf16 (const char16_t * unicode , qsizetype size )

类 QStringList :

(从 6.9 起) QStringList filter (const QLatin1StringMatcher & matcher ) const

类 QThread :

(从 6.9 起) QThread::QualityOfService serviceLevel () const
(从 6.9 起) void setServiceLevel (QThread::QualityOfService serviceLevel )

类 QThreadPool :

(从 6.9 起) QThread::QualityOfService serviceLevel () const
(从 6.9 起) void setServiceLevel (QThread::QualityOfService serviceLevel )

类 QTimerEvent :

(从 6.9 起) bool matches (const QBasicTimer & timer ) const

类 QUtf8StringView :

(从 6.9 起) QString arg (Args &&... args ) const

类 QUuid :

(从 6.9 起) QUuid createUuidV7 ()

类 QWebEngineUrlRequestInfo :

(从 6.9 起) bool isDownload () const

类 QWindow :

(从 6.9 起) QMargins safeAreaMargins () const
(从 6.9 起) void safeAreaMarginsChanged (QMargins margins )

类 QXYSeries :

(从 6.9 起) void pointsAdded (qsizetype start , qsizetype end )

新宏

(从 6.9 起) QCOMPARE_3WAY ( lhs , rhs , order )
(从 6.9 起) Q_CONSTEXPR_DTOR
(从 6.9 起) Q_DECL_CONSTEXPR_DTOR
(从 6.9 起) Q_DECL_EQ_DELETE_X ( reason )
(从 6.9 起) Q_DISABLE_COPY_MOVE_X ( Class , reason )
(从 6.9 起) Q_DISABLE_COPY_X ( Class , reason )
(从 6.9 起) Q_LIKELY_BRANCH
(从 6.9 起) Q_STATIC_LOGGING_CATEGORY ( name , string , msgType )
(从 6.9 起) Q_STATIC_LOGGING_CATEGORY ( name , string )
(从 6.9 起) Q_UNLIKELY_BRANCH

新枚举类型

(从 6.9 起) 枚举类 NonceMode { Automatic, Enabled, Disabled }
(从 6.9 起) 枚举类 LabelDrawingMode { UseStyle, UseDelegate }
(从 6.9 起) 枚举类 MessageType { Information, Error }
(从 6.9 起) 枚举类 AccessLevelExBit { None, CurrentRead, CurrentWrite, HistoryRead, HistoryWrite, …, Constant }
(从 6.9 起) 枚举类 QualityOfService { Auto, High, Eco }
(从 6.9 起) 枚举类 TransparencyTechnique { Default, Approximate, Accurate }

新枚举值

枚举值 Error::ClientError
枚举值 Error::ExpiredError
枚举值 Flag::DisableEmojiParsing
枚举值 Flag::ShowDefaultIgnorables
枚举值 Language::KaraKalpak
枚举值 Language::SwampyCree
枚举值 NodeAttribute::AccessLevelEx
枚举值 NodeAttribute::AccessRestrictions
枚举值 NodeAttribute::RolePermissions
枚举值 NodeAttribute::UserRolePermissions
枚举值 Option::DisableAnimations
枚举值 Option::DisableCSSAnimations
枚举值 Option::DisableSMILAnimations
枚举值 ReferenceTypeId::AlarmSuppressionGroupMember
枚举值 ReferenceTypeId::HasReferenceDescription
枚举值 Role::BlockQuote
枚举值 Script::Script_Garay
枚举值 Script::Script_GurungKhema
枚举值 Script::Script_KiratRai
枚举值 Script::Script_OlOnal
枚举值 Script::Script_Sunuwar
枚举值 Script::Script_Todhri
枚举值 Script::Script_TuluTigalari
枚举值 TabFeature::MinimumSizeHint
枚举值 Type::SafeAreaMarginsChange
枚举值 UnicodeVersion::Unicode_16_0
枚举值 UnixProcessFlag::DisableCoreDumps
枚举值 ViewItemFeature::IsDecoratedRootColumn
枚举值 ViewItemFeature::IsDecorationForRootColumn
枚举值 WindowType::ExpandedClientAreaHint
枚举值 WindowType::NoTitleBarBackgroundHint
枚举值 WriteMaskBit::AccessLevelEx
枚举值 WriteMaskBit::AccessRestrictions
枚举值 WriteMaskBit::DataTypeDefinition
枚举值 WriteMaskBit::RolePermissions

新类型别名

(从 6.9 起) const_iterator
(从 6.9 起) const_pointer
(从 6.9 起) const_reference
(从 6.9 起) const_reverse_iterator
(从 6.9 起) difference_type
(从 6.9 起) pointer
(从 6.9 起) reference
(从 6.9 起) value_type
(从 6.9 起) JsonFormat

新特性

新 QML 类型

C
ConeGeometry
ContextMenu
CuboidGeometry
CylinderGeometry
D
DelegateChoice
DelegateChooser
E
ExtrudedTextGeometry
F
FontInfo
P
PlaneGeometry
S
SafeArea
Shear
SphereGeometry
Spline3DSeries
T
TableViewDelegate
TorusGeometry
X
XrHapticEffect
XrHapticFeedback
XrSimpleHapticEffect

新 QML 特性

QML 类型 Abstract3DAxis :

(从 6.9 起) labelSize : real
(从 6.9 起) scaleLabelsByCount : bool

QML 类型 AbstractAxis :

(从 6.9 起) alignment : alignment

QML 类型 ApplicationWindow :

(从 6.9 起) bottomPadding : real
(从 6.9 起) leftPadding : real
(从 6.9 起) rightPadding : real
(从 6.9 起) topPadding : real

QML 类型 DebugSettings :

(从 6.9 起) drawPointLightShadowBoxes : bool

QML 类型 DirectionalLight :

(从 6.9 起) lockShadowmapTexels : bool

QML 类型 DynamicRigidBody :

(从 6.9 起) isSleeping : bool

QML 类型 Flickable :

(从 6.9 起) acceptedButtons : flags

QML 类型 FontMetrics :

(从 6.9 起) capitalHeight : real

QML 类型 GraphsItem3D :

(从 6.9 起) maxCameraXRotation : real
(从 6.9 起) maxCameraYRotation : real
(从 6.9 起) minCameraXRotation : real
(从 6.9 起) minCameraYRotation : real
(从 6.9 起) rootNode : Node
(从 6.9 起) transparencyTechnique : Graphs3D.TransparencyTechnique

QML 类型 GraphsView :

(从 6.9 起) plotArea : rect

QML 类型 Light :

(从 6.9 起) use32BitShadowmap : bool

QML 类型 OrbitCameraController :

(从 6.9 起) acceptedButtons : Qt::MouseButtons
(从 6.9 起) automaticClipping : bool

QML 类型 路径 :

(从 6.9 起) asynchronous : bool

QML 类型 RandomInstancing :

(从 6.9 起) gridSpacing : vector3d

QML 类型 SceneEnvironment :

(从 6.9 起) oitMethod : enumeration

QML 类型 ValueAxis :

(从 6.9 起) pan : real
(从 6.9 起) zoom : real

QML 类型 视频 :

(从 6.9 起) endOfStreamPolicy : enumeration
(从 6.9 起) orientation : int

QML 类型 VideoOutput :

(从 6.9 起) endOfStreamPolicy : enumeration
(从 6.9 起) mirrored : bool

QML 类型 XrInputAction :

(从 6.9 起) enabled : bool

新 QML 信号

(从 6.9 起) pointsAdded (int start , int end )
(从 6.9 起) textEdited ()

新 QML 方法

QML 类型 视频 :

(从 6.9 起) clearOutput ()

QML 类型 VideoOutput :

(从 6.9 起) void clearOutput ()