Qt 6.6 中的新类和函数

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

新名称空间

namespace QWebEngineGlobalSettings

新类

A
Any ( QtProtobuf )
B
BlockVariable ( QShaderDescription )
BuiltinVariable ( QShaderDescription )
C
QCapturableWindow
D
DnsMode ( QWebEngineGlobalSettings )
I
Id128Bytes ( QUuid )
InOutVariable ( QShaderDescription )
N
QNativeIpcKey
O
QOpcUaConnectionSettings
P
PushConstantBlock ( QShaderDescription )
QPdfLinkModel
QPdfPageSelector
Q
QQuick3DExtensionHelpers
QQuick3DRenderExtension
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 :

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

QBluetoothPermission :

QBluetoothPermission::CommunicationModes communicationModes () const
void setCommunicationModes (QBluetoothPermission::CommunicationModes modes )

QBluetoothUuid :

QBluetoothUuid fromCBUUID (CBUUID * cbUuid )
CBUUID * toCBUUID () const

QByteArray :

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

QDebug :

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

QDnsLookup :

void setNameserver (const QHostAddress & nameserver , quint16 port )

QElapsedTimer :

QElapsedTimer::Duration durationElapsed () const
QElapsedTimer::Duration durationTo (const QElapsedTimer & other ) const

QFileInfo :

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

QFileSystemModel :

QDateTime lastModified (const QModelIndex & index , const QTimeZone & tz ) const

QFont :

(preliminary) void clearFeatures ()
(preliminary) QList<quint32> featureTags () const
(preliminary) quint32 featureValue (quint32 tag ) const
(preliminary) bool isFeatureSet (quint32 tag ) const
(preliminary) void setFeature (const char * feature , quint32 value )
(preliminary) void setFeature (quint32 tag , quint32 value )
(preliminary) quint32 stringToTag (const char * name )
(preliminary) QByteArray tagToString (quint32 tag )
(preliminary) void unsetFeature (quint32 tag )
(preliminary) void unsetFeature (const char * feature )

QHostAddress :

bool isPrivateUse () const

QJSPrimitiveValue :

void * data ()
QMetaType metaType () const
QJSPrimitiveValue to () const

QList :

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

QMessageAuthenticationCode :

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

QMessageBox :

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

QMetaEnum :

QMetaType metaType () const

QMetaProperty :

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

QMetaType :

QMetaType underlyingType () const

QMutex :

bool tryLock (QDeadlineTimer timer )

QSGD3D12Texture :

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

QObject :

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

QOpcUaClient :

QOpcUaConnectionSettings connectionSettings () const
void setConnectionSettings (const QOpcUaConnectionSettings & connectionSettings )

QPalette :

const QBrush & accent () const
bool operator== (const QPalette & p ) const

QPdfDocument :

int pageIndexForLabel (const QString & label )

QPointer :

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

QProcess :

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

QPromise :

bool addResults (const QList<T> & 结果 )

QProtobufMessage :

bool setProperty (QAnyStringView propertyName , QVariant && value )

QQmlEngine :

void markCurrentFunctionAsTranslationBinding ()

QQuick3DGeometry :

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

QQuickGraphicsConfiguration :

void setTimestamps (bool enable )
bool timestampsEnabled () const

QQuickGraphicsDevice :

QQuickGraphicsDevice fromRhi (QRhi * rhi )

QQuickRenderControl :

QRhiCommandBuffer * commandBuffer () const
QRhi * rhi () const

QQuickRenderTarget :

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

QQuickWindow :

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

QReadWriteLock :

bool tryLockForRead (QDeadlineTimer timeout )
bool tryLockForWrite (QDeadlineTimer timeout )

QRecursiveMutex :

bool tryLock (QDeadlineTimer timeout )

QSGRenderNode :

QRhiCommandBuffer * commandBuffer () const
QRhiRenderTarget * renderTarget () const

QSemaphore :

bool tryAcquire (int n , QDeadlineTimer timer )

QSharedMemory :

QNativeIpcKey nativeIpcKey () const
void setNativeKey (const QNativeIpcKey & key )

QSignalSpy :

bool wait (std::chrono::milliseconds timeout )

QSqlField :

void swap (QSqlField & other )

QSqlIndex :

QSqlIndex & operator= (QSqlIndex && other )

QSqlQuery :

QString boundValueName (int pos ) const
QStringList boundValueNames () const

QSqlRecord :

QSqlRecord & operator= (QSqlRecord && other )
void swap (QSqlRecord & other )

QString :

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

QStringDecoder :

char16_t * appendToBuffer (char16_t * out , QByteArrayView in )

QTextListFormat :

void setStart (int start )
int start () const

QTextToSpeech :

void aboutToSynthesize (qsizetype id )
qsizetype enqueue (const QString & utterance )
QList<QVoice> findVoices (Args &&... args ) const
void sayingWord (const QString & word , qsizetype id , qsizetype start , qsizetype length )

QThread :

void sleep (std::chrono::nanoseconds nsecs )

QUuid :

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

Id128Bytes :

QUuid::Id128Bytes qFromBigEndian (QUuid::Id128Bytes src )
QUuid::Id128Bytes qFromLittleEndian (QUuid::Id128Bytes src )
QUuid::Id128Bytes qToBigEndian (QUuid::Id128Bytes src )
QUuid::Id128Bytes qToLittleEndian (QUuid::Id128Bytes src )

QVarLengthArray :

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

QVariant :

T & emplace (Args &&... args )
T & emplace (std::initializer_list<U> list , Args &&... args )
QVariant fromStdVariant (std::variant<Types...> && value )
QVariant fromValue (T && value )

QWebEnginePage :

QString devToolsId () const

QWebEngineUrlRequestJob :

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

QWebSocket :

void authenticationRequired (QAuthenticator * authenticator )

QWidget :

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

QXmlStreamReader :

bool hasStandaloneDeclaration () const

名称空间中的新函数

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

新全局函数

QString qWebEngineGetDomainAndRegistry (const QUrl & url )

新宏

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

新枚举类型

enum CommunicationMode { Access, Advertise, Default }
enum class ReferenceSurface { Map, Globe }
enum class Option { DontUseNativeDialog }
enum class UnixProcessFlag { ResetSignalHandlers, IgnoreSigPipe, CloseFileDescriptors, UseVFork }
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

新类型别名

qint128
quint128

新特性

新 QML 类型

B
BluetoothPermission
C
CalendarPermission
CameraPermission
CapturableWindow
ContactsPermission
L
LocationPermission
M
MicrophonePermission
V
VoiceSelector
W
WindowCapture

新 QML 特性

QML Type CaptureSession :

windowCapture : WindowCapture

QML Type CharacterController :

enableShapeHitCallback : bool

QML Type ColorGroup :

accent : color

QML Type Dial :

endAngle : real
startAngle : real

QML Type MediaRecorder :

audioBitRate : int
audioChannelCount : int
audioSampleRate : int
encodingMode : enumeration
videoBitRate : int
videoFrameRate : real
videoResolution : Size

QML Type Path :

simplify : bool

QML Type PathText :

font.features : object

QML Type RenderStats :

lastCompletedGpuTime : float

QML Type ScrollView :

effectiveScrollBarHeight : real
effectiveScrollBarWidth : real

QML Type 形状 :

boundingRect : rect
preferredRendererType : enumeration

QML Type SpinBox :

live : bool

QML Type TableView :

selectionMode : enumeration

QML Type 文本 :

font.features : object

QML Type TextEdit :

font.features : object

QML Type TextInput :

font.features : object

QML Type TextToSpeech :

engineCapabilities : enumeration

QML Type TreeView :

rootIndex : QModelIndex

QML Type XMLHttpRequest :

responseURL : string

QML Type voice :

language : enumerator

新 QML 信号

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

新 QML 方法

QML Type TextToSpeech :

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

QML Type XMLHttpRequest :

void overrideMimeType ( mime )