Qt 6.6 中的新类和函数

本页包含 Qt 6.6 中引入的所有新类和函数的完整列表。

新命名空间

(since 6.6) 命名空间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
模板操作状态 (QRhiGraphicsPipeline)
存储块 (QShaderDescription)
T
目标混合 (QRhiGraphicsPipeline)
U
统一块 (QShaderDescription)
Unix进程参数 (QProcess)
W
QWindowCapture

新成员函数

QAbstractOAuthReplyHandler

(自6.6版本) voidtokenRequestErrorOccurred(QAbstractOAuth::Error error, const QString &errorString)

QBluetoothAddress

(自6.6版本) size_tqHash(const QBluetoothAddress &key, size_t seed)

QBluetoothPermission

(自6.6版本) QBluetoothPermission::CommunicationModescommunicationModes() const
(自6.6版本) voidsetCommunicationModes(QBluetoothPermission::CommunicationModes modes)

QBluetoothUuid

(自6.6版本) QBluetoothUuidfromCBUUID(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版本) voidsetNameserver(const QHostAddress &nameserver, quint16 port)

QElapsedTimer

(自6.6版本) QElapsedTimer::DurationdurationElapsed() const
(自6.6版本) QElapsedTimer::DurationdurationTo(const QElapsedTimer &other) const

QFileInfo

(自6.6版本) QDateTimebirthTime(const QTimeZone &tz) const
(自6.6版本) QDateTimefileTime(QFileDevice::FileTime time, const QTimeZone &tz) const
(自6.6版本) std::filesystem::pathfilesystemReadSymLink() const
(自6.6版本) QDateTimelastModified(const QTimeZone &tz) const
(自6.6版本) QDateTimelastRead(const QTimeZone &tz) const
(自6.6版本) QDateTimemetadataChangeTime(const QTimeZone &tz) const
(自6.6版本) QStringreadSymLink() const

QFileSystemModel

(自6.6版本) QDateTimelastModified(const QModelIndex &index, const QTimeZone &tz) const

QHostAddress

(自6.6版本) boolisPrivateUse() const

QJSPrimitiveValue

(自6.6版本) const void *constData() const
(自6.6以来) void *数据()
(自6.6版本) const void *数据() const
(自6.6以来) QMetaTypemetaType() const
(自6.6以来) QJSPrimitiveValueto() 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以来) QByteArrayViewresultView() const
(自6.6版本) voidswap(QMessageAuthenticationCode &other)

QMessageBox

(自6.6版本) voidsetOption(QMessageBox::Option option, bool on)
(自6.6版本) booltestOption(QMessageBox::Option option) const

QMetaEnum

(自6.6以来) QMetaTypemetaType() const

QMetaProperty

(自6.6版本) boolwrite(QObject *object, QVariant &&v) const
(自6.6版本) boolwriteOnGadget(void *gadget, QVariant &&value) const

QMetaType

(自6.6以来) QMetaTypeunderlyingType() const

QMutex

(自6.6版本) booltryLock(QDeadlineTimer timer)

QSGD3D12Texture

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

QNtfsPermissionCheckGuard

(自6.6版本) boolqAreNtfsPermissionChecksEnabled()
(自6.6版本) boolqDisableNtfsPermissionChecks()
(自6.6版本) boolqEnableNtfsPermissionChecks()

QObject

(自6.6版本) boolsetProperty(const char *name, QVariant &&value)

QOpcUaClient

(自6.6以来) QOpcUaConnectionSettingsconnectionSettings() const
(自6.6版本) voidsetConnectionSettings(const QOpcUaConnectionSettings &connectionSettings)

QPalette

(自6.6以来) const QBrush &highlight() const
(自6.6版本) booloperator==(const QPalette &p) const

QPdfDocument

(自6.6以来) intpageIndexForLabel(const QString &label)

QPointer

(自6.6以来) QPointer<T> &operator=(const QPointer<X> &other)

QProcess

(自6.6版本) voidsetUnixProcessParameters(const QProcess::UnixProcessParameters &params)
(自6.6版本) voidsetUnixProcessParameters(QProcess::UnixProcessFlags flagsOnly)
(自6.6以来) QProcess::UnixProcessParametersunixProcessParameters() const

QPromise

(自6.6版本) booladdResults(const QList<T> &results)
(自6.6版本) boolemplaceResult(Args &&... args)
(自6.6版本) boolemplaceResultAt(int index, Args &&... args)

QProtobufMessage

(自6.6版本) boolsetProperty(QAnyStringView propertyName, QVariant &&value)

QQmlEngine


QQuick3DGeometry

(自6.6版本) voidaddTargetAttribute(quint32 targetId, QQuick3DGeometry::Attribute::Semantic semantic, int offset, int stride)
(自6.6版本) voidaddTargetAttribute(const QQuick3DGeometry::TargetAttribute &attribute)
(自6.6版本) voidsetTargetData(const QByteArray &data)
(自6.6版本) voidsetTargetData(int offset, const QByteArray &data)
(since 6.6) QQuick3DGeometry::TargetAttributetargetAttribute(int index) const
(自6.6以来) inttargetAttributeCount() const
(since 6.6) QByteArraytargetData() const

QQuickGraphicsConfiguration

(自6.6版本) voidsetTimestamps(bool enable)
(自6.6版本) booltimestampsEnabled() const

QQuickGraphicsDevice

(since 6.6) QQuickGraphicsDevicefromRhi(QRhi *rhi)

QQuickRenderControl

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

QQuickRenderTarget

(since 6.6) QQuickRenderTargetfromD3D12Texture(void *texture, int resourceState, uint format, const QSize &pixelSize, int sampleCount)
(since 6.6) QQuickRenderTargetfromRhiRenderTarget(QRhiRenderTarget *renderTarget)

QQuickWindow

(自6.6以来) QSGTexture *createTextureFromRhiTexture(QRhiTexture *texture, QQuickWindow::CreateTextureOptions options) const
(since 6.6) QRhi *rhi() const
(since 6.6) QRhiSwapChain *swapChain() const

QReadWriteLock

(自6.6版本) booltryLockForRead(QDeadlineTimer timeout)
(自6.6版本) booltryLockForWrite(QDeadlineTimer timeout)

QRecursiveMutex

(自6.6版本) booltryLock(QDeadlineTimer timeout)

QSGRenderNode

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

QSemaphore

(自6.6版本) booltryAcquire(int n, QDeadlineTimer timer)

QSharedMemory

(since 6.6) QNativeIpcKeynativeIpcKey() const
(自6.6版本) voidsetNativeKey(const QNativeIpcKey &key)

QSignalSpy

(自6.6版本) boolwait(std::chrono::milliseconds timeout)

QSqlField

(自6.6版本) voidswap(QSqlField &other)

QSqlIndex

(since 6.6) QSqlIndex &operator=(QSqlIndex &&other)

QSqlQuery

(自6.6版本) QStringboundValueName(int pos) const
(since 6.6) QStringListboundValueNames() const

QSqlRecord

(since 6.6) QSqlRecord &operator=(QSqlRecord &&other)
(自6.6版本) voidswap(QSqlRecord &other)

QString

(since 6.6) QString &assign(QAnyStringView v)
(since 6.6) QString &assign(qsizetype n, QChar c)
(since 6.6) QString &assign(InputIterator first, InputIterator last)
(自6.6版本) QStringfromEcmaString(emscripten::val jsString)
(since 6.6) emscripten::valtoEcmaString() const

QStringDecoder

(since 6.6) char16_t *appendToBuffer(char16_t *out, QByteArrayView in)

QTextListFormat

(自6.6版本) voidsetStart(int start)
(自6.6以来) intstart() const

QTextToSpeech

(自6.6版本) voidaboutToSynthesize(qsizetype id)
(since 6.6) qsizetypeenqueue(const QString &utterance)
(since 6.6) QList<QVoice>findVoices(Args &&... args) const
(自6.6版本) voidsayingWord(const QString &word, qsizetype id, qsizetype start, qsizetype length)
(自6.6版本) voidsynthesize(const QString &text, const QObject *context, Functor &&functor)
(自6.6版本) voidsynthesize(const QString &text, Functor &&functor)

QThread

(自6.6版本) voidsleep(std::chrono::nanoseconds nsecs)

QUuid

(since 6.6) QUuidfromBytes(const void *bytes, QSysInfo::Endian order)
(since 6.6) QUuidfromUInt128(quint128 uuid, QSysInfo::Endian order)
(since 6.6) QUuid::Id128BytestoBytes(QSysInfo::Endian order) const
(since 6.6) quint128toUInt128(QSysInfo::Endian order) const

Id128Bytes

(since 6.6) QUuid::Id128BytesqFromBigEndian(QUuid::Id128Bytes src)
(since 6.6) QUuid::Id128BytesqFromLittleEndian(QUuid::Id128Bytes src)
(since 6.6) QUuid::Id128BytesqToBigEndian(QUuid::Id128Bytes src)
(since 6.6) QUuid::Id128BytesqToLittleEndian(QUuid::Id128Bytes src)

QVarLengthArray

(since 6.6) QVarLengthArray<T, Prealloc> &assign(qsizetype n, const T &t)
(since 6.6) QVarLengthArray<T, Prealloc> &assign(InputIterator first, InputIterator last)
(since 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) QVariantfromStdVariant(std::variant<Types...> &&value)
(自6.6) QVariantfromValue(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版本) QStringdevToolsId() const

QWebEngineUrlRequestJob

(自6.6版本) voidsetAdditionalResponseHeaders(const QMultiMap<QByteArray, QByteArray> &additionalResponseHeaders) const

QWebSocket

(自6.6版本) voidauthenticationRequired(QAuthenticator *authenticator)

QWidget

(自6.6版本) voidsetTabOrder(std::initializer_list<QWidget *> widgets)

QXmlStreamReader

(自6.6版本) boolhasStandaloneDeclaration() const

命名空间中的新函数

(自6.6) QFuture<ValueType>makeReadyRangeFuture(std::initializer_list<ValueType> values)
(自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版本) QStringqWebEngineGetDomainAndRegistry(const QUrl &url)

新宏

(自6.6) QT_SUPPORTS_INT128
(自6.6) qint128Q_INT128_C(literal)
(自6.6) Q_INT128_MAX
(自6.6) Q_INT128_MIN
(自6.6) Q_NODISCARD_CTOR
(since 6.6) quint128Q_UINT128_C(literal)
(自6.6) Q_UINT128_MAX

新枚举类型

(自6.6) enumCommunicationMode { Access, Advertise, Default }
(自6.6) enum classReferenceSurface { Map, Globe }
(自6.6) enum classOption { DontUseNativeDialog }
(自6.6) enum classUnixProcessFlag { ResetSignalHandlers, IgnoreSigPipe, CloseFileDescriptors, UseVFork, CreateNewSession, …, ResetIds }
(自6.6) enum class能力 { None, Speak, PauseResume, WordByWordProgress, Synthesize }

新枚举值

新类型别名

(自6.6) qint128
(自6.6) quint128

新属性

新 QML 类型

新 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 类型 Path

(自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 : 枚举

QML 类型 SpinBox

(自6.6) live : bool

QML 类型 TableView

(自6.6) selectionMode : 枚举

QML 类型 Text

(自6.6) font.features : 对象

QML 类型 TextEdit

(自6.6) font.features : 对象

QML 类型 TextInput

(自6.6) font.features : 对象

QML 类型 TextToSpeech

(自6.6) engineCapabilities : 枚举

QML 类型 TreeView

(自6.6) rootIndex : QModelIndex

QML 类型 XMLHttpRequest

(自6.6) responseURL : string

QML 类型 voice

(自6.6) language : 枚举

新的 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版本) voidoverrideMimeType(mime)

© 2024 Qt 公司 Ltd. 本文档中的贡献版权属于各自的拥有者。本提供文档是在 Free Software Foundation 发布的协议下授予的 GNU 自由文档许可证版本 1.3。Qt 和相应的标志是 Qt 公司在芬兰及全球其他国家的商标。所有其他商标均为其各自所有者的财产。