What's New in Qt 6.8
New and Restored Modules in Qt 6.8
Qt 6.8 adds the following modules and tools:
- The svgtoqml tool is now available out of tech preview. It can be used to generate QML code from SVG documents. It supports a static subset of the
SVG Tiny 1.2
profile.
New and Restored Modules in Technical Preview
Note: API and ABI stability is not guaranteed for modules in technical preview.
New Features in Qt 6.8
Qt Core Module
- QChronoTimer is a replacement for QTimer using std::chrono durations throughout.
- QTimer::id() returns a Qt::TimerId, introduced and accepted in place of int timer IDs in new overloads of various methods that take one.
- More support for std::chrono durations to replace integral nanosecond parameters in QAbstractEventDispatcher.
- QString, QByteArray, and QList gain resizeForOverwrite().
- QString, QByteArray gain slice() equivalent to
*this = sliced()
. - QString, QByteArray, QList, QVarLengthArray gain max_size() for stl compat.
- QList supports construction with uninitialized entries to a specified size, where the content-type permits.
- QVarLengthArray::PreallocatedSize tells you the Prealloc parameter.
- QLatin1StringMatcher::indexOf() can now take a QStringView.
- QCollatorSortKey now supports move-construction.
- QStringEncoder and QStringDecoder can now take the encoding name as a QString.
- QThread gains isMainThread(), isCurrentThread().
- QThreadPool::waitForDone() now accepts a QDeadlineTimer in place of int milliseconds.
- QDirListing provides stl-style iteration over directory entries.
- QVersionNumber can now be constructed from a QSpan; it can also be iterated.
- qHash() now accepts quint128 and qint128.
- QMap::qHash() tells you a key's hash value.
- QHash can now hash different types from its key, if they are marked as having the equivalent hash result for equivalent values (C++20 only). This works for QString/QStringView and QByteArray/QByteArrayView pairs. On all systems except on ARM processors, the QLatin1StringView also participates in the QString and QStringView hashing.
- QPointF, QLineF, QRectF, QMarginsF now support fuzzy comparison and null-checks.
- Define QT_ENABLE_STRICT_MODE_UP_TO opts out of various APIs, documented by which version it cuts them out at.
- Define QT_NO_QASCONST to disable qAsConst().
- Define QT_(NO_)USE_NODISCARD_FILE_OPEN to control [[nodiscard]] on open() methods of I/O classes.
Qt Graphs Module
- Nothing to see here.
Qt GRPC Module
- Nothing to see here.
Qt GUI Module
- QStyleHints::colorScheme now has a setter function, allowing applications to try to override the system setting with an explicit Dark or Light scheme.
- Added QFont::ContextFontMerging, which can be used to enable a new font merging algorithm that takes the full string into account when selecting fallback fonts. This may come at some more cost, but in certain cases it will give better results.
- Added QFontDatabase::addApplicationFallbackFontFamily(), which provides a means to override the default system fallback fonts for specific scripts.
- Added QDesktopServices custom and https URL scheme support, for macOS, similar to what iOS has.
- QImage::Format_CMYK8888 a 32bit CMYK image format has been added.
- QColorSpace support for ICC A2B color spaces processing has been added. Along with explicit support for grayscale and CMYK color spaces.
- QColorSpace::transformModel() returns the underlying processing model.
- QColorSpace::colorModel() returns which color model the color space is made for.
- QImage::colorTransformed() and QImage::applyColorTransform() variants with three arguments, has been added to support converting both image format and color space at the same time.
Qt Graphs Module
- Brought out of tech preview.
- Split into two submodules: QtGraphs and QtGraphsWidgets to remove the requirement for including widgets into pure QML applications.
Qt Location Module
- Nothing to see here.
Qt Multimedia Module
- Nothing to see here.
Qt Network Module
- QNetworkAccessManager gained support for sending HTTP requests over local socket using the unix+http: or local+http: scheme.
- QDnsLookup gained support for TLS association records, returning the authentic data bit and DNS over TLS on some platforms, see QDnsLookup::isProtocolSupported().
Qt OPC UA Module
- Nothing to see here.
Qt Network Auth Module
- Added QOAuthUriSchemeReplyHandler class, which handles private/custom and https URI scheme redirects (on supported platforms).
- Added Proof of Key Code Exchange (PKCE) support to QOAuth2AuthorizationCodeFlow class. PKCE is a recommended security measure to mitigate authorization code interception attacks.
Qt Positioning Module
- Nothing to see here.
Qt Protobuf Module
- Nothing to see here.
Qt QML Module
- Nothing to see here.
Qt Quick Module
- Added font.contextFontMerging, which can be used to enable a new font merging algorithm that takes the full text into account when selecting fallback fonts. This may come at some more cost, but in certain cases it will give better results.
- Added the Image.retainWhileLoading property. When set to true on images that load asynchronously, the current image data will be retained until the new image is fully loaded. This can avoid flickering.
- Added ShapePath.fillItem to Qt Quick Shapes. This can be used to take any texture provider item (such as layered items and images) and use them as fill for the shape.
- Added ShapePath.fillTransform to Qt Quick Shapes, which can be used to set an arbitrary transform on the shape's fill, whether it is an item or a gradient.
- Added PlanarTransform, a utility object providing simple functions for specifying 2D transformation matrices.
- Introduced the VectorImage: A component which can be used to render vector graphics directly Qt Quick with hardware acceleration and no pre-rasterization. It currently supports the SVG format (a static subset of the
SVG Tiny 1.2
profile.)
Qt Quick Controls Module
- Nothing to see here.
Qt Quick Shapes Module
- Nothing to see here.
Qt Quick Timeline Module
- Nothing to see here.
Qt Quick 3D Module
- Technology Preview of XR support for Qt Quick 3D
- Support for Head Mounted Displays (HMD) using OpenXR such as the Meta Quest 2 and 3
- Support for Apple Vision Pro
- Multi-view rendering (render both eyes in a single pass)
- Spatial input support via hand tracking or controllers
- Support for spatial anchors
- Improved Shadow Rendering
- Overall quality improvements
- Enhanced shadow debug tooling
- Cascading Shadow Maps
- Percentage-closer filtering (PCF) soft shadows.
- PrincipledMaterial Enhancements
- Additional parameters for adjusting Fresnel
- Support for property masking based on the vertex color attribute
- CustomMaterial: expose remaining properties from PrincipledMaterial
Qt Quick 3D Physics Module
- Nothing to see here.
Qt Serial Bus Module
- Nothing to see here.
Qt Sql Module
- Nothing to see here.
Qt SVG Module
- Nothing to see here.
Qt Test Module
- Nothing to see here.
Qt TextToSpeech Module
- Nothing to see here.
Qt WebEngine Module
- QWebEngineFrame added for frame specific API, such as running javascript on specific frames, or printing specific frames.
- QWebEngineClientHints added to better control the browser identification to web pages using client hints DOM api.
- QWebEngineCertificateError::isMainFrame() indicates the certificate error is from a main or sub frame.
- QWebEngineNavigationRequest::hasFormData() added to indicate a navigation request sending form data.
- QWebEnginePage::ClipboardReadWrite and QWebEnginePage::LocalFontsAccess features added.
- QWebEngineSettings::imageAnimationPolicy() added to control image animation policy.
Qt WebView Module
- Nothing to see here.
Qt Widgets Module
- Nothing to see here.
Tools
Qt Widgets Designer
- Nothing to see here.
Platform Changes
Desktop Platforms
Windows
- Changed the font system to use DirectWrite as the default backend. This enables some modern features which were not available with the legacy GDI backend. The previous backend is still available and can be enabled by passing
fontengine=gdi
as parameter to the QPA plugin.
macOS
- Nothing to see here.
X11
- Nothing to see here.
Wayland Client on Linux
- Nothing to see here.
WebAssembly
- Nothing to see here.
Mobile Platforms
Android
- Bumped the minimum supported version to Android 9.
- Added support for build.gradle namespace property.
- Added a CMake property QT_ANDROID_PACKAGE_NAME to set the package name.
- Updated Gradle to 8.7 and AGP to 8.4.0.
- Added support for building AAR library packages.
- Deprecated the native Android backend in Qt Multimedia.
- When opening libraries with QLibrary, JNI_OnLoad is no longer called by default.
- QtQuickView and QML Embedding:
- Added strong typing support for QtQuickView API.
- Added API to manage QML Components, under this Java classes under QtQuickView were moved to own classes. This includes:
- QtQuickView.SignalListener to QtSignalListener
- QtQuickView.StatusChangeListener to QtQmlStatusChangeListener
- QtQuickView Status to QtQmlStatus
- Added Java classes QtAbstractItemModel, QtAbstractListModel and QtModelIndex that wraps QAbstractItemModel, QAbstractListModel, and QModelIndex respectively.
- Added support for QML embedding from a Service.
iOS
- Nothing to see here.
Embedded Platforms
Boot to Qt
- Nothing to see here.
VxWorks
- Nothing to see here.
INTEGRITY
- Nothing to see here.
List of API Changes
These pages contain an overview of API changes in Qt 6.8: