Qt 6.6 中的新类和函数

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

新名称空间

(从 6.6 起) namespace QWebEngineGlobalSettings

新类

A
Any ( QtProtobuf )
B
BlockVariable ( QShaderDescription )
BuiltinVariable ( QShaderDescription )
C
QCapturableWindow
D
DnsMode ( QWebEngineGlobalSettings )
G
QGrpcCallOptions
QGrpcChannelOptions
I
Id128Bytes ( QUuid )
InOutVariable ( QShaderDescription )
N
QNativeIpcKey
QNtfsPermissionCheckGuard
O
QOpcUaConnectionSettings
P
PushConstantBlock ( QShaderDescription )
QPdfLinkModel
QPdfPageSelector
Q
QQuick3DExtensionHelpers
R
QRhi
QRhiBuffer
QRhiColorAttachment
QRhiCommandBuffer
QRhiComputePipeline
QRhiD3D11InitParams
QRhiD3D11NativeHandles
QRhiDepthStencilClearValue
QRhiDriverInfo
QRhiGles2InitParams
QRhiGles2NativeHandles
QRhiGraphicsPipeline
QRhiInitParams
QRhiMetalCommandBufferNativeHandles
QRhiMetalInitParams
QRhiMetalNativeHandles
QRhiNativeHandles
QRhiNullInitParams
QRhiNullNativeHandles
QRhiReadbackDescription
QRhiReadbackResult
QRhiRenderBuffer
QRhiRenderPassDescriptor
QRhiRenderTarget
QRhiResource
QRhiResourceUpdateBatch
QRhiSampler
QRhiScissor
QRhiShaderResourceBinding
QRhiShaderResourceBindings
QRhiShaderStage
QRhiStats
QRhiSwapChain
QRhiSwapChainHdrInfo
QRhiSwapChainProxyData
QRhiSwapChainRenderTarget
QRhiTexture
QRhiTextureCopyDescription
QRhiTextureRenderTarget
QRhiTextureRenderTargetDescription
QRhiTextureSubresourceUploadDescription
QRhiTextureUploadDescription
QRhiTextureUploadEntry
QRhiVertexInputAttribute
QRhiVertexInputBinding
QRhiVertexInputLayout
QRhiViewport
QRhiVulkanCommandBufferNativeHandles
QRhiVulkanInitParams
QRhiVulkanNativeHandles
QRhiVulkanRenderPassNativeHandles
S
QScopedPropertyUpdateGroup
QSGD3D12Texture ( QNativeInterface )
QShader
QShaderBaker
QShaderCode
QShaderDescription
QShaderKey
QShaderVersion
StencilOpState ( QRhiGraphicsPipeline )
StorageBlock ( QShaderDescription )
T
TargetBlend ( QRhiGraphicsPipeline )
U
UniformBlock ( QShaderDescription )
UnixProcessParameters ( QProcess )
W
QWindowCapture

新成员函数

QAbstractOAuthReplyHandler :

(从 6.6 起) void tokenRequestErrorOccurred (QAbstractOAuth::Error error , const QString & errorString )

QBluetoothAddress :

(从 6.6 起) size_t qHash (const QBluetoothAddress & key , size_t seed )

QBluetoothPermission :

(从 6.6 起) QBluetoothPermission::CommunicationModes communicationModes () const
(从 6.6 起) void setCommunicationModes (QBluetoothPermission::CommunicationModes modes )

QBluetoothUuid :

(从 6.6 起) QBluetoothUuid fromCBUUID (CBUUID * cbUuid )
(从 6.6 起) CBUUID * toCBUUID () const

QByteArray :

(从 6.6 起) QByteArray & assign (QByteArrayView v )
(从 6.6 起) QByteArray & assign (qsizetype n , char c )
(从 6.6 起) QByteArray & assign (InputIterator first , InputIterator last )

QDebug :

(从 6.6 起) QDebug & operator<< (std::chrono::duration<Rep, Period> duration )

QDnsLookup :

(从 6.6 起) void setNameserver (const QHostAddress & nameserver , quint16 port )

QElapsedTimer :

(从 6.6 起) QElapsedTimer::Duration durationElapsed () const
(从 6.6 起) QElapsedTimer::Duration durationTo (const QElapsedTimer & other ) const

QFileInfo :

(从 6.6 起) QDateTime birthTime (const QTimeZone & tz ) const
(从 6.6 起) QDateTime fileTime (QFileDevice::FileTime time , const QTimeZone & tz ) const
(从 6.6 起) std::filesystem::path filesystemReadSymLink () const
(从 6.6 起) QDateTime lastModified (const QTimeZone & tz ) const
(从 6.6 起) QDateTime lastRead (const QTimeZone & tz ) const
(从 6.6 起) QDateTime metadataChangeTime (const QTimeZone & tz ) const
(从 6.6 起) QString readSymLink () const

QFileSystemModel :

(从 6.6 起) QDateTime lastModified (const QModelIndex & index , const QTimeZone & tz ) const

QHostAddress :

(从 6.6 起) bool isPrivateUse () const

QJSPrimitiveValue :

(从 6.6 起) const void * constData () const
(从 6.6 起) void * data ()
(从 6.6 起) const void * data () const
(从 6.6 起) QMetaType metaType () const
(从 6.6 起) QJSPrimitiveValue to () const

QList :

(从 6.6 起) QList<T> & assign (qsizetype n , QList<T>::parameter_type t )
(从 6.6 起) QList<T> & assign (InputIterator first , InputIterator last )
(从 6.6 起) QList<T> & assign (std::initializer_list<T> l )

QMessageAuthenticationCode :

(从 6.6 起) QMessageAuthenticationCode & operator= (QMessageAuthenticationCode && other )
(从 6.6 起) QByteArrayView resultView () const
(从 6.6 起) void swap (QMessageAuthenticationCode & other )

QMessageBox :

(从 6.6 起) void setOption (QMessageBox::Option option , bool on )
(从 6.6 起) bool testOption (QMessageBox::Option option ) const

QMetaEnum :

(从 6.6 起) QMetaType metaType () const

QMetaProperty :

(从 6.6 起) bool write (QObject * object , QVariant && v ) const
(从 6.6 起) bool writeOnGadget (void * gadget , QVariant && value ) const

QMetaType :

(从 6.6 起) QMetaType underlyingType () const

QMutex :

(从 6.6 起) bool tryLock (QDeadlineTimer timer )

QSGD3D12Texture :

(从 6.6 起) QSGTexture * fromNative (void * texture , int resourceState , QQuickWindow * window , const QSize & size , QQuickWindow::CreateTextureOptions options )

QNtfsPermissionCheckGuard :

(从 6.6 起) bool qAreNtfsPermissionChecksEnabled ()
(从 6.6 起) bool qDisableNtfsPermissionChecks ()
(从 6.6 起) bool qEnableNtfsPermissionChecks ()

QObject :

(从 6.6 起) bool setProperty (const char * name , QVariant && value )

QOpcUaClient :

(从 6.6 起) QOpcUaConnectionSettings connectionSettings () const
(从 6.6 起) void setConnectionSettings (const QOpcUaConnectionSettings & connectionSettings )

QPalette :

(从 6.6 起) const QBrush & accent () const
(从 6.6 起) bool operator== (const QPalette & p ) const

QPdfDocument :

(从 6.6 起) int pageIndexForLabel (const QString & label )

QPointer :

(从 6.6 起) QPointer<T> & operator= (const QPointer<X> & other )

QProcess :

(从 6.6 起) void setUnixProcessParameters (const QProcess::UnixProcessParameters & params )
(从 6.6 起) void setUnixProcessParameters (QProcess::UnixProcessFlags flagsOnly )
(从 6.6 起) QProcess::UnixProcessParameters unixProcessParameters () const

QPromise :

(从 6.6 起) bool addResults (const QList<T> & 结果 )
(从 6.6 起) bool emplaceResult (Args &&... args )
(从 6.6 起) bool emplaceResultAt (int index , Args &&... args )

QProtobufMessage :

(从 6.6 起) bool setProperty (QAnyStringView propertyName , QVariant && value )

QQmlEngine :

(从 6.6 起) void markCurrentFunctionAsTranslationBinding ()

QQuick3DGeometry :

(从 6.6 起) void addTargetAttribute (quint32 targetId , QQuick3DGeometry::Attribute::Semantic semantic , int offset , int stride )
(从 6.6 起) void addTargetAttribute (const QQuick3DGeometry::TargetAttribute & 属性 )
(从 6.6 起) void setTargetData (const QByteArray & data )
(从 6.6 起) void setTargetData (int offset , const QByteArray & data )
(从 6.6 起) QQuick3DGeometry::TargetAttribute targetAttribute (int index ) const
(从 6.6 起) int targetAttributeCount () const
(从 6.6 起) QByteArray targetData () const

QQuickGraphicsConfiguration :

(从 6.6 起) void setTimestamps (bool enable )
(从 6.6 起) bool timestampsEnabled () const

QQuickGraphicsDevice :

(从 6.6 起) QQuickGraphicsDevice fromRhi (QRhi * rhi )

QQuickRenderControl :

(从 6.6 起) QRhiCommandBuffer * commandBuffer () const
(从 6.6 起) QRhi * rhi () const

QQuickRenderTarget :

(从 6.6 起) QQuickRenderTarget fromD3D12Texture (void * texture , int resourceState , uint format , const QSize & pixelSize , int sampleCount )
(从 6.6 起) QQuickRenderTarget fromRhiRenderTarget (QRhiRenderTarget * renderTarget )

QQuickWindow :

(从 6.6 起) QSGTexture * createTextureFromRhiTexture (QRhiTexture * texture , QQuickWindow::CreateTextureOptions options ) const
(从 6.6 起) QRhi * rhi () const
(从 6.6 起) QRhiSwapChain * swapChain () const

QReadWriteLock :

(从 6.6 起) bool tryLockForRead (QDeadlineTimer timeout )
(从 6.6 起) bool tryLockForWrite (QDeadlineTimer timeout )

QRecursiveMutex :

(从 6.6 起) bool tryLock (QDeadlineTimer timeout )

QSGRenderNode :

(从 6.6 起) QRhiCommandBuffer * commandBuffer () const
(从 6.6 起) QRhiRenderTarget * renderTarget () const

QSemaphore :

(从 6.6 起) bool tryAcquire (int n , QDeadlineTimer timer )

QSharedMemory :

(从 6.6 起) QNativeIpcKey nativeIpcKey () const
(从 6.6 起) void setNativeKey (const QNativeIpcKey & key )

QSignalSpy :

(从 6.6 起) bool wait (std::chrono::milliseconds timeout )

QSqlField :

(从 6.6 起) void swap (QSqlField & other )

QSqlIndex :

(从 6.6 起) QSqlIndex & operator= (QSqlIndex && other )

QSqlQuery :

(从 6.6 起) QString boundValueName (int pos ) const
(从 6.6 起) QStringList boundValueNames () const

QSqlRecord :

(从 6.6 起) QSqlRecord & operator= (QSqlRecord && other )
(从 6.6 起) void swap (QSqlRecord & other )

QString :

(从 6.6 起) QString & assign (QAnyStringView v )
(从 6.6 起) QString & assign (qsizetype n , QChar c )
(从 6.6 起) QString & assign (InputIterator first , InputIterator last )
(从 6.6 起) QString fromEcmaString (emscripten::val jsString )
(从 6.6 起) emscripten::val toEcmaString () const

QStringDecoder :

(从 6.6 起) char16_t * appendToBuffer (char16_t * out , QByteArrayView in )

QTextListFormat :

(从 6.6 起) void setStart (int start )
(从 6.6 起) int start () const

QTextToSpeech :

(从 6.6 起) void aboutToSynthesize (qsizetype id )
(从 6.6 起) qsizetype enqueue (const QString & utterance )
(从 6.6 起) QList<QVoice> findVoices (Args &&... args ) const
(从 6.6 起) void sayingWord (const QString & word , qsizetype id , qsizetype start , qsizetype length )
(从 6.6 起) void synthesize (const QString & text , const QObject * context , Functor && functor )
(从 6.6 起) void synthesize (const QString & text , Functor && functor )

QThread :

(从 6.6 起) void sleep (std::chrono::nanoseconds nsecs )

QUuid :

(从 6.6 起) QUuid fromBytes (const void * bytes , QSysInfo::Endian order )
(从 6.6 起) QUuid fromUInt128 (quint128 uuid , QSysInfo::Endian order )
(从 6.6 起) QUuid::Id128Bytes toBytes (QSysInfo::Endian order ) const
(从 6.6 起) quint128 toUInt128 (QSysInfo::Endian order ) const

Id128Bytes :

(从 6.6 起) QUuid::Id128Bytes qFromBigEndian (QUuid::Id128Bytes src )
(从 6.6 起) QUuid::Id128Bytes qFromLittleEndian (QUuid::Id128Bytes src )
(从 6.6 起) QUuid::Id128Bytes qToBigEndian (QUuid::Id128Bytes src )
(从 6.6 起) QUuid::Id128Bytes qToLittleEndian (QUuid::Id128Bytes src )

QVarLengthArray :

(从 6.6 起) QVarLengthArray<T, Prealloc> & assign (qsizetype n , const T & t )
(从 6.6 起) QVarLengthArray<T, Prealloc> & assign (InputIterator first , InputIterator last )
(从 6.6 起) QVarLengthArray<T, Prealloc> & assign (std::initializer_list<T> list )

QVariant :

(从 6.6 起) T & emplace (Args &&... args )
(从 6.6 起) T & emplace (std::initializer_list<U> list , Args &&... args )
(从 6.6 起) QVariant fromStdVariant (std::variant<Types...> && value )
(从 6.6 起) QVariant fromValue (T && value )
(从 6.6 起) T & get (QVariant & v )
(从 6.6 起) const T & get (const QVariant & v )
(从 6.6 起) T && get (QVariant && v )
(从 6.6 起) const T && get (const QVariant && v )
(从 6.6 起) T * get_if (QVariant * v )
(从 6.6 起) const T * get_if (const QVariant * v )

QWebEnginePage :

(从 6.6 起) QString devToolsId () const

QWebEngineUrlRequestJob :

(从 6.6 起) void setAdditionalResponseHeaders (const QMultiMap<QByteArray, QByteArray> & additionalResponseHeaders ) const

QWebSocket :

(从 6.6 起) void authenticationRequired (QAuthenticator * authenticator )

QWidget :

(从 6.6 起) void setTabOrder (std::initializer_list<QWidget *> widgets )

QXmlStreamReader :

(从 6.6 起) bool hasStandaloneDeclaration () const

名称空间中的新函数

(从 6.6 起) QFuture<ValueType> makeReadyRangeFuture (std::initializer_list<ValueType> )
(从 6.6 起) QFuture<QtFuture::ContainedType<Container>> makeReadyRangeFuture (Container && container )
(从 6.6 起) QFuture<std::decay_t<T>> makeReadyValueFuture (T && value )
(从 6.6 起) QFuture<void> makeReadyVoidFuture ()

新全局函数

(从 6.6 起) QString qWebEngineGetDomainAndRegistry (const QUrl & url )

新宏

(从 6.6 起) QT_SUPPORTS_INT128
(从 6.6 起) qint128 Q_INT128_C ( literal )
(从 6.6 起) Q_INT128_MAX
(从 6.6 起) Q_INT128_MIN
(从 6.6 起) Q_NODISCARD_CTOR
(从 6.6 起) quint128 Q_UINT128_C ( literal )
(从 6.6 起) Q_UINT128_MAX

新枚举类型

(从 6.6 起) enum CommunicationMode { Access, Advertise, Default }
(从 6.6 起) enum class ReferenceSurface { Map, Globe }
(从 6.6 起) enum class Option { DontUseNativeDialog }
(从 6.6 起) enum class UnixProcessFlag { ResetSignalHandlers, IgnoreSigPipe, CloseFileDescriptors, UseVFork, CreateNewSession, …, ResetIds }
(从 6.6 起) enum class Capability { None, Speak, PauseResume, WordByWordProgress, Synthesize }

New Enum Values

enum value BoundaryHint::Utterance
enum value ColorRole::Accent
enum value Flag::FetchApiAllowed
enum value GraphicsApi::Direct3D12
enum value Language::Baluchi
enum value Language::Ligurian
enum value Language::Rohingya
enum value Language::Torwali
enum value Property::ListStart
enum value RelationFlag::Described
enum value RelationFlag::DescriptionFor
enum value RelationFlag::FlowsFrom
enum value RelationFlag::FlowsTo
enum value Resource::GraphicsQueueFamilyIndexResource
enum value Resource::GraphicsQueueIndexResource
enum value Script::HanifiScript
enum value TabPosition::Moving
enum value Type::DevicePixelRatioChange
enum value WebAction::ChangeTextDirectionLTR
enum value WebAction::ChangeTextDirectionRTL
enum value WildcardConversionOption::NonPathWildcardConversion

新类型别名

(从 6.6 起) qint128
(从 6.6 起) quint128

新特性

新 QML 类型

B
BluetoothPermission
C
CalendarPermission
CameraPermission
CapturableWindow
ContactsPermission
L
LocationPermission
M
MicrophonePermission
P
ProceduralMesh
ProceduralMeshSubset
ProceduralTextureData
V
VoiceSelector
W
WindowCapture

新 QML 特性

QML 类型 CaptureSession :

(从 6.6 起) windowCapture : WindowCapture

QML 类型 CharacterController :

(从 6.6 起) enableShapeHitCallback : bool

QML 类型 ColorGroup :

(从 6.6 起) accent : color

QML 类型 Dial :

(从 6.6 起) endAngle : real
(从 6.6 起) startAngle : real

QML 类型 MediaRecorder :

(从 6.6 起) audioBitRate : int
(从 6.6 起) audioChannelCount : int
(从 6.6 起) audioSampleRate : int
(从 6.6 起) encodingMode : enumeration
(从 6.6 起) videoBitRate : int
(从 6.6 起) videoFrameRate : real
(从 6.6 起) videoResolution : Size

QML 类型 路径 :

(从 6.6 起) simplify : bool

QML 类型 PathText :

(从 6.6 起) font.features : object

QML 类型 RenderStats :

(从 6.6 起) lastCompletedGpuTime : float

QML 类型 ScrollView :

(从 6.6 起) effectiveScrollBarHeight : real
(从 6.6 起) effectiveScrollBarWidth : real

QML 类型 Shape :

(从 6.6 起) boundingRect : rect
(从 6.6 起) preferredRendererType : enumeration

QML 类型 SpinBox :

(从 6.6 起) live : bool

QML 类型 TableView :

(从 6.6 起) selectionMode : enumeration

QML 类型 Text :

(从 6.6 起) font.features : object

QML 类型 TextEdit :

(从 6.6 起) font.features : object

QML 类型 TextInput :

(从 6.6 起) font.features : object

QML 类型 TextToSpeech :

(从 6.6 起) engineCapabilities : enumeration

QML 类型 TreeView :

(从 6.6 起) rootIndex : QModelIndex

QML 类型 XMLHttpRequest :

(从 6.6 起) responseURL : string

QML 类型 voice :

(从 6.6 起) 语言 : enumerator

新 QML 信号

(从 6.6 起) aboutToSynthesize (number id )
(从 6.6 起) sayingWord (string word , int id , int start , int length )
(从 6.6 起) shapeHit (PhysicsNode * body , vector3D position , vector3D impulse , vector3D normal )
(从 6.6 起) wrapped (Dial.WrapDirection direction )

新 QML 方法

QML 类型 TextToSpeech :

(从 6.6 起) enqueue (string utterance )
(从 6.6 起) list<voice> findVoices (map criteria )

QML 类型 XMLHttpRequest :

(从 6.6 起) void overrideMimeType ( mime )