New Classes and Functions in Qt 6.8 | Qt 6.8
Description: A list of new APIs in Qt 6.8.

- Qt 6.8
- What's new in Qt 6
- New Classes and Functions in Qt 6.8
- Qt 6.8.0 Reference Documentation

# New Classes and Functions in Qt 6.8

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

- New Classes
- New Member Functions
- New Functions in Namespaces
- New Macros
- New Enum Types
- New Enum Values
- New Type Aliases
- New Properties
- New QML Types
- New QML Properties
- New QML Methods

### New Classes

A
  QAccessibleAttributesInterface

C
  QChronoTimer

D
  QDirListing

G
  QGrpcSerializationFormat

H
  QHelpSearchEngineCore

T
  ThrowOnFailDisabler (QTest)
  ThrowOnFailEnabler (QTest)
  ThrowOnSkipDisabler (QTest)
  ThrowOnSkipEnabler (QTest)

V
  ViewFormat (QRhiTexture)

W
  QWebEngineClientHints

### New Member Functions

Class QAbstractEventDispatcher:

`(since 6.8)` void | registerTimer(Qt::TimerId timerId, QAbstractEventDispatcher::Duration interval, Qt::TimerType timerType, QObject *object)
`(since 6.8)` Qt::TimerId | registerTimer(QAbstractEventDispatcher::Duration interval, Qt::TimerType timerType, QObject *object)
`(since 6.8)` QList<QAbstractEventDispatcher::TimerInfoV2> | timersForObject(QObject *object) const
`(since 6.8)` bool | unregisterTimer(Qt::TimerId timerId)

Class QByteArray:

`(since 6.8)` qsizetype | max_size()
`(since 6.8)` void | resizeForOverwrite(qsizetype size)
`(since 6.8)` QByteArray & | slice(qsizetype pos, qsizetype n)
`(since 6.8)` QByteArray & | slice(qsizetype pos)

Class QCanBus:

`(since 6.8)` QList<QCanBusDeviceInfo> | availableDevices(QString *errorMessage) const

Class QColorSpace:

`(since 6.8)` QColorSpace::ColorModel | colorModel() const
`(since 6.8)` bool | isValidTarget() const
`(since 6.8)` void | setWhitePoint(const QPointF &whitePoint)
`(since 6.8)` QColorSpace::TransformModel | transformModel() const
`(since 6.8)` QPointF | whitePoint() const

Class QFontDatabase:

`(since 6.8)` void | addApplicationFallbackFontFamily(QChar::Script script, const QString &familyName)
`(since 6.8)` QStringList | applicationFallbackFontFamilies(QChar::Script script)
`(since 6.8)` bool | removeApplicationFallbackFontFamily(QChar::Script script, const QString &familyName)
`(since 6.8)` void | setApplicationFallbackFontFamilies(QChar::Script script, const QStringList &familyNames)

Class QGrpcBidirStream:

`(since 6.8)` void | sendMessage(const QProtobufMessage *message)

Class QGrpcChannelOptions:

`(since 6.8)` const QGrpcSerializationFormat & | serializationFormat() const
`(since 6.8)` QGrpcChannelOptions & | withSerializationFormat(const QGrpcSerializationFormat &format)

Class QGrpcClientStream:

`(since 6.8)` void | sendMessage(const QProtobufMessage *message)

Class QGrpcOperation:

`(since 6.8)` QAbstractProtobufSerializer::DeserializationError | deserializationError() const
`(since 6.8)` QString | deserializationErrorString() const
`(since 6.8)` bool | read(QProtobufMessage *message) const

Class QHash:

`(since 6.8)` size_t | qHash(qint128 key, size_t seed)
`(since 6.8)` size_t | qHash(quint128 key, size_t seed)

Class QHelpContentModel:

`(since 6.8)` void | createContentsForCurrentFilter()

Class QHelpIndexModel:

`(since 6.8)` void | createIndexForCurrentFilter()

Class QHttpHeaders:

`(since 6.8)` bool | replaceOrAppend(QHttpHeaders::WellKnownHeader name, QAnyStringView newValue)

Class QHttpServerResponse:

`(since 6.8)` QHttpHeaders | headers() const
`(since 6.8)` QHttpServerResponse & | withHeaders(QHttpHeaders &&headers)
`(since 6.8)` QHttpServerResponse & | withHeaders(const QHttpHeaders &headers)

Class QImage:

`(since 6.8)` void | applyColorTransform(const QColorTransform &transform, QImage::Format toFormat, Qt::ImageConversionFlags flags)
`(since 6.8)` QImage | colorTransformed(const QColorTransform &transform, QImage::Format toFormat, Qt::ImageConversionFlags flags) const &
`(since 6.8)` QImage | colorTransformed(const QColorTransform &transform, QImage::Format format, Qt::ImageConversionFlags flags) &&
`(since 6.8)` void | convertToColorSpace(const QColorSpace &colorSpace, QImage::Format format, Qt::ImageConversionFlags flags)
`(since 6.8)` QImage | convertedToColorSpace(const QColorSpace &colorSpace, QImage::Format format, Qt::ImageConversionFlags flags) const

Class QList:

`(since 6.8)` qsizetype | max_size()
`(since 6.8)` void | resizeForOverwrite(qsizetype size)

Class QLocalServer:

`(since 6.8)` void | addPendingConnection(QLocalSocket *socket)

Class QMap:

`(since 6.8)` size_t | qHash(const QMap<Key, T> &key, size_t seed)

Class QNetworkAccessManager:

`(since 6.8)` QNetworkReply * | post(const QNetworkRequest &request, std::nullptr_t nptr)
`(since 6.8)` QNetworkReply * | put(const QNetworkRequest &request, std::nullptr_t nptr)

Class QNetworkRequestFactory:

`(since 6.8)` QVariant | attribute(QNetworkRequest::Attribute attribute) const
`(since 6.8)` QVariant | attribute(QNetworkRequest::Attribute attribute, const QVariant &defaultValue) const
`(since 6.8)` void | clearAttribute(QNetworkRequest::Attribute attribute)
`(since 6.8)` void | clearAttributes()
`(since 6.8)` QNetworkRequest::Priority | priority() const
`(since 6.8)` void | setAttribute(QNetworkRequest::Attribute attribute, const QVariant &value)
`(since 6.8)` void | setPriority(QNetworkRequest::Priority priority)

Class QObject:

`(since 6.8)` void | killTimer(Qt::TimerId id)

Class QPdfWriter:

`(since 6.8)` QPdfWriter::ColorModel | colorModel() const
`(since 6.8)` void | setColorModel(QPdfWriter::ColorModel model)

Class QProtobufMessage:

`(since 6.8)` bool | deserialize(QAbstractProtobufSerializer *serializer, QByteArrayView data)
`(since 6.8)` const QtProtobufPrivate::QProtobufPropertyOrdering * | propertyOrdering() const
`(since 6.8)` QByteArray | serialize(QAbstractProtobufSerializer *serializer) const

Class QQuickRenderTarget:

`(since 6.8)` QRhiTexture * | depthTexture() const
`(since 6.8)` QQuickRenderTarget | fromD3D11Texture(void *texture, uint format, const QSize &pixelSize, int sampleCount, QQuickRenderTarget::Flags flags)
`(since 6.8)` QQuickRenderTarget | fromD3D12Texture(void *texture, int resourceState, uint format, uint viewFormat, const QSize &pixelSize, int sampleCount, int arraySize, QQuickRenderTarget::Flags flags)
`(since 6.8)` QQuickRenderTarget | fromMetalTexture(MTLTexture *texture, uint format, uint viewFormat, const QSize &pixelSize, int sampleCount, int arraySize, QQuickRenderTarget::Flags flags)
`(since 6.8)` QQuickRenderTarget | fromOpenGLTexture(uint textureId, uint format, const QSize &pixelSize, int sampleCount, int arraySize, QQuickRenderTarget::Flags flags)
`(since 6.8)` QQuickRenderTarget | fromVulkanImage(VkImage image, VkImageLayout layout, VkFormat format, VkFormat viewFormat, const QSize &pixelSize, int sampleCount, int arraySize, QQuickRenderTarget::Flags flags)
`(since 6.8)` void | setDepthTexture(QRhiTexture *texture)

Class QQuickWebEngineProfile:

`(since 6.8)` QWebEngineClientHints * | clientHints() const

Class QRhiTexture:

`(since 6.8)` QRhiTexture::ViewFormat | readViewFormat() const
`(since 6.8)` void | setReadViewFormat(const QRhiTexture::ViewFormat &fmt)
`(since 6.8)` void | setWriteViewFormat(const QRhiTexture::ViewFormat &fmt)
`(since 6.8)` QRhiTexture::ViewFormat | writeViewFormat() const

Class QRhiTextureRenderTargetDescription:

`(since 6.8)` QRhiTexture * | depthResolveTexture() const
`(since 6.8)` void | setDepthResolveTexture(QRhiTexture *tex)

Class QSGMaterial:

`(since 6.8)` int | viewCount() const

Class QSGMaterialShader:

`(since 6.8)` void | setShaderFileName(QSGMaterialShader::Stage stage, const QString &filename, int viewCount)

Class QString:

`(since 6.8)` qsizetype | max_size()
`(since 6.8)` void | resizeForOverwrite(qsizetype size)
`(since 6.8)` QString & | slice(qsizetype pos, qsizetype n)
`(since 6.8)` QString & | slice(qsizetype pos)

Class QTimer:

`(since 6.8)` Qt::TimerId | id() const

Class QVarLengthArray:

`(since 6.8)` qsizetype | max_size()

Class QVersionNumber:

`(since 6.8)` QVersionNumber::const_iterator | begin() const
`(since 6.8)` QVersionNumber::const_iterator | cbegin() const
`(since 6.8)` QVersionNumber::const_iterator | cend() const
`(since 6.8)` QVersionNumber::const_iterator | constBegin() const
`(since 6.8)` QVersionNumber::const_iterator | constEnd() const
`(since 6.8)` QVersionNumber::const_reverse_iterator | crbegin() const
`(since 6.8)` QVersionNumber::const_reverse_iterator | crend() const
`(since 6.8)` QVersionNumber::const_iterator | end() const
`(since 6.8)` QVersionNumber::const_reverse_iterator | rbegin() const
`(since 6.8)` QVersionNumber::const_reverse_iterator | rend() const

Class QWebEngineProfile:

`(since 6.8)` QWebEngineClientHints * | clientHints() const

### New Functions in Namespaces

`(since 6.8)` void | setThrowOnFail(bool enable)
`(since 6.8)` void | setThrowOnSkip(bool enable)
`(since 6.8)` void | wheelEvent(QWindow *window, QPointF pos, QPoint angleDelta, QPoint pixelDelta, Qt::KeyboardModifiers stateKey, Qt::ScrollPhase phase)

### New Macros

`(since 6.8)` | QTEST_THROW_ON_FAIL
`(since 6.8)` | QTEST_THROW_ON_SKIP
`(since 6.8)` | QT_ENABLE_STRICT_MODE_UP_TO
`(since 6.8)` | QT_NO_QASCONST
`(since 6.8)` | QT_NO_USE_NODISCARD_FILE_OPEN
`(since 6.8)` | QT_USE_NODISCARD_FILE_OPEN

### New Enum Types

`(since 6.8)` enum class | Attribute { Custom, Level }
`(since 6.8)` enum class | ColorModel { Undefined, Rgb, Gray, Cmyk }
`(since 6.8)` enum class | TransformModel { ThreeComponentMatrix, ElementListProcessing }
`(since 6.8)` enum class | ColorModel { RGB, Grayscale, CMYK, Auto }
`(since 6.8)` enum class | Flag { MultisampleResolve }
`(since 6.8)` enum class | TimerId { Invalid }

### New Enum Values

enum value | Feature::ClipboardReadWrite
enum value | Feature::LocalFontsAccess
enum value | Format::Format_CMYK8888
enum value | InterfaceType::AttributesInterface
enum value | UnicodeVersion::Unicode_15_1

### New Type Aliases

`(since 6.8)` | const_iterator
`(since 6.8)` | const_pointer
`(since 6.8)` | const_reference
`(since 6.8)` | const_reverse_iterator
`(since 6.8)` | difference_type
`(since 6.8)` | pointer
`(since 6.8)` | reference
`(since 6.8)` | size_type
`(since 6.8)` | value_type

### New Properties

`(since 6.8)` count : const `(since 6.8)` numericalPrecisionPolicy : const `(since 6.8)` numericalPrecisionPolicy : const `(since 6.8)` autoValue : const `(since 6.8)` defaultValue : const `(since 6.8)` generated : const `(since 6.8)` length : const `(since 6.8)` metaType : const `(since 6.8)` precision : const `(since 6.8)` readOnly : const | `(since 6.8)` requiredStatus : const `(since 6.8)` tableName : const `(since 6.8)` value : const `(since 6.8)` cursorName : const `(since 6.8)` name : const `(since 6.8)` forwardOnly : const `(since 6.8)` numericalPrecisionPolicy : const `(since 6.8)` positionalBindingEnabled : const `(since 6.8)` modal : const `(since 6.8)` modal : const

### New QML Types

V
  VectorImage

### New QML Properties

QML Type Drag:

`(since 6.8)` | imageSourceSize : QUrl

QML Type PdfSearchModel:

`(since 6.8)` | count : int

QML Type PrincipledMaterial:

`(since 6.8)` | baseColorChannel : enumeration
`(since 6.8)` | baseColorSingleChannelEnabled : bool
`(since 6.8)` | emissiveChannel : enumeration
`(since 6.8)` | emissiveSingleChannelEnabled : bool
`(since 6.8)` | invertOpacityMapValue : real
`(since 6.8)` | specularChannel : enumeration
`(since 6.8)` | specularSingleChannelEnabled : bool
`(since 6.8)` | vertexColorAlphaMask : enumeration
`(since 6.8)` | vertexColorBlueMask : enumeration
`(since 6.8)` | vertexColorGreenMask : enumeration
`(since 6.8)` | vertexColorRedMask : enumeration
`(since 6.8)` | vertexColorsMaskEnabled : bool

QML Type QQmlGrpcChannelOptions:

`(since 6.8)` | serializationFormat : enumeration

QML Type ShellSurface:

`(since 6.8)` | modal : bool

QML Type SpecularGlossyMaterial:

`(since 6.8)` | albedoChannel : enumeration
`(since 6.8)` | albedoSingleChannelEnabled : bool
`(since 6.8)` | emissiveChannel : enumeration
`(since 6.8)` | emissiveSingleChannelEnabled : bool
`(since 6.8)` | invertOpacityMapValue : real
`(since 6.8)` | specularChannel : enumeration
`(since 6.8)` | specularSingleChannelEnabled : bool
`(since 6.8)` | vertexColorAlphaMask : enumeration
`(since 6.8)` | vertexColorBlueMask : enumeration
`(since 6.8)` | vertexColorGreenMask : enumeration
`(since 6.8)` | vertexColorRedMask : enumeration
`(since 6.8)` | vertexColorsMaskEnabled : bool

QML Type XdgToplevel:

`(since 6.8)` | modal : bool

QML Type pickResult:

`(since 6.8)` | hitType : enumeration
`(since 6.8)` | itemHit : Item

### New QML Methods

QML Type View3D:

`(since 6.8)` PickResult | pick(float x, float y, Model model)
`(since 6.8)` List<PickResult> | pickSubset(float x, float y, list<Model> models)