What's New in Qt 6.6
Qt 6.6 adds the following modules and tools:
Note: API and ABI stability is not guaranteed.
Note: This section might be empty is there are no changes.
Qt Graphs is meant to be the replacement module for Qt Data Visualization. It uses Qt Quick 3D as the rendering engine to provide support for native graphics backends, instead of relying on OpenGL 2.1, like Qt Data Visualization does.
The module will provide most, if not all of the functionality of Qt Data Visualization. Some advanced features may be incomplete in Technical Preview.
- Added Q_NODISCARD_CTOR macro that should be applied to mark constructors nodiscard. The macro resolves to
[[nodiscard]]on compilers that support it, and does nothing on other compilers.
assign()overloads to the following Qt containers: QVarLengthArray, QList, QByteArray and QString. These functions are a convenient way to assign new data while reusing the existing
- You can omit the contents of any file added to the resource file system by specifying the QT_DISCARD_FILE_CONTENTS source file property in CMakeLists.txt. The file nodes will be retained. When manually writing
.qrcfiles you can achieve the same effect by setting the
emptyattribute of a
fileXML node to
- QFileInfo got a new readSymLink() member function that returns the raw path, and new overloads taking a QTimeZone for functions related to time stamps.
- The QProcess::UnixProcessParameters struct and the QProcess::UnixProcessFlag enum can be used in the new QProcess::setUnixProcessParameters() member function to modify Unix-specific settings and parameters of a child process, such as closing extraneous file descriptors.
- The new QNativeIpcKey class holds a native key used by QSharedMemory and QSystemSemaphore, providing better support for sandboxed applications on Apple platforms. See Native IPC Keys for more information.
- Most Qt APIs working with time spans have been ported to relevant data types from
- QXmlStreamReader::hasStandaloneDeclaration() reports whether the document has an explicit standalone declaration.
- Added QGrpcChannelOptions and QGrpcCallOptions. Those are the new methods to pass options to channels and calls.
- Added QGrpcMetadata to pass additional metadata to the calls.
- Integrated QML-types support for auto-generated QtGRPC classes.
- Added QFont::setFeatures() for direct access to OpenType features in the font.
- QPalette now has an accent() color entry that uses the systems' accent color by default.
- The QRhi family of classes are now fully documented and offered as APIs with a limited compatibility promise. The Qt Rendering Hardware Interface is a 3D graphics API and shading language abstraction layer that is used by modules such as Qt Quick and Qt Quick 3D to implement cross-platform, portable rendering engines and material systems that can function on top of Direct 3D 11/12, Vulkan, Metal, OpenGL, and OpenGL ES. Applications that wish to perform their own low-level rendering without directly relying on potentially platform-specific 3D APIs and shading languages can now use QRhi and the related classes to augment a Qt Quick scene, render to a QWindow, perform offscreen rendering into a texture, or to dispatch GPU compute workloads. In previous Qt 6 releases the QRhi classes were fully private and the documentation was not provided as part of the standard Qt documentation set. Now they are treated similarly to the QPA (QPlatform*) classes, meaning they form a special set of classes that do not offer all the standard patterns and source/binary compatibility promises of public Qt APIs, but are nonetheless available for use by intermediate/advanced level application developers. The documentation for the QRhi APIs is now part of the standard Qt documentation. Also introduced the rhiwindow example.
- Added a Direct 3D 12 backend for QRhi. This does not currently affect any applications because Qt Quick's and QQuickWidget's default backend choice continues to be Direct 3D 11 on Windows, and this is not expected to change in the foreseeable future either. The new D3D12 backend should be considered experimental for the time being, and is useful primarily for applications that have a need to get Qt to perform its rendering via Direct 3D 12 in order to simplify interoperating with the application's own or some external component's rendering or compute engine requiring D3D12.
- Qt 6 applications can now support custom or platform specific clipboard formats, using the new QUtiMimeConverter (for macOS) and QWindowsMimeConverter for Windows) classes. Those classes are unified versions of the QMacPasteboardMime and QWindowsMime types from Qt 5. See the porting guide for help with adapting an existing implementation.
- QTextListFormat::setStart() allows for a text list to start with an index other than 1.
- Map items are now rendered more correctly, including those that wrap around the globe or contain holes.
- Map items can now be rendered using different reference surfaces. The QLocation::ReferenceSurface enum provides options
Globe, which can be used with the referenceSurface properties in the item types to control whether an item is rendered on a flat map, or follows the globes curvature.
- The mouse wheel can change the bearing when the Shift modifier is held, or change the tilt when the Control modifier is held.
- The Qt Multimedia library no longer requests audio or video permissions, but only checks if they are provided or not. The client applications must request the permissions using the C++ or QML permissions API.
- The new QWindowCapture class adds support for capturing videos of individual desktop application windows within a QMediaCaptureSession. The recorded video can be directed to any type of video output, for example to the QMediaRecorder or to the QVideoWidget. Window capturing is only supported with the FFmpeg backend.
- QMediaRecorder has been extended with properties that gives better control of video quality, resolution, and bit rates.
- The new QPdfLinkModel class provides the link geometry and destinations on a specified page.
- QPdfDocument::pageModel() implements Qt::DecorationRole to render page thumbnails on-demand.
- The new QPdfPageSelector class is a specialized QSpinBox for selecting a page in widget-based PDF viewers.
- The Qt Positioning library no longer requests the location permissions, but only checks if they are provided or not. The client applications must request the permissions using the C++ or QML permissions API.
- Enabled using certain Qt Core and Qt GUI types as a part of *.proto schema.
- Integrated QML-types support for auto-generated QProtobufMessage classes.
- Migrated to the implicitly shared data for auto-generated QProtobufMessage classes. This allows accessing the message types by-value from a QML context without making a lot of copies.
- Added the Qt Protobuf Well-Known Types support for the google.protobuf.Any type.
- Integrated support for the oneof type, a union-like type in protobuf, that need not contain a value.
- The Qt Bluetooth library no longer requests the bluetooth permissions, buts only checks if they are provided or not. The client applications must request the permissions using the C++ or QML permissions API.
- Qt now provides a native 128-bit unsigned int type as quint128. On platforms that support it, the QBluetoothUuid(quint128) constructor and the QBluetoothUuid::toUInt128() method now use this type instead of a custom struct that earlier Qt versions used. As long as your code treats quint128 as an opaque type, the change is source- and binary-compatible, but consider using the new overloads taking QUuid::Id128Bytes if you encounter any issues. Platforms that do not support the 128-bit int types (such as MSVC) still use the custom struct from Qt Bluetooth.
- Added support for managing application permissions via QML. The Qt QML Core module exposes the Qt C++ Application Permissions functionality to QML via a set of permission types that can be used to check or request permission in a cross platform manner. See QML Application Permissions for more information.
- The XMLHttpRequest object has now been updated with two more features, in order to bring it closer to modern browsers. The responseURL property has been added, which can be used to confirm whether any redirects has occurred. Similarly, the overrideMimeType method has been added, which can be used to make the XMLHttpRequest object parse the response based on a specific mime type, rather than what's in the Content-Type header of the response.
- The QML language server has gotten initial support for go-to definition and find usages. It also supports full document formatting.
- It is now possible to extend qmllint with plugins. The plugin API is currently in tech preview.
- Added font.features property for direct access to OpenType features in the font.
- TableView has a selectionMode property to control whether single or multiple cells can be selected.
- TreeView has a rootIndex property to show only a subtree from the model.
- AnimatedImage now supports the sourceSize property.
- The environment variable
QT_QUICK_FLICKABLE_WHEEL_DECELERATIONlets you customize the deceleration after scrolling with a "clicky" wheel mouse. By default, acceleration is now turned off so that scrolling distance is proportional to the number of "clicks" (unless the platform provides its own acceleration); but you can set a value less than 15000 to restore old behavior. The flickDeceleration property now applies only to touch flicks.
- Most properties are now FINAL, meaning that they can no longer be shadowed by declaring new properties with the same names. A warning will be emitted if a
FINALproperty is shadowed. We recommend that users rename such properties to avoid unexpected behavior changes.
- Added and exposed a number of QRhi-related functions in QQuickWindow, QQuickRenderControl, and QSGTexture. Querying the QRhi, QRhiSwapChain, or QRhiCommandBuffer used by the onscreen or offscreen Qt Quick rendering is now simplified. Some functions previously hidden from the documentation due to relying on QRhi* classes are made visible. Added createTextureFromRhiTexture() to QQuickWindow serving as the counterpart of createTextureFromImage().
- Updated the scenegraph examples: added rhiunderqml, replaced the legacy, OpenGL-only fboitem example with a new, portable rhitextureitem example, and updated the customrendernode example. These together demonstrate the three ways to extend a Qt Quick scene with custom low-level 2D/3D rendering (the three approaches being: underlay/overlay, custom item backed by rendering to a texture, custom item with QSGRenderNode).
- Added Path::simplified property for automatic simplification of paths before rendering them. This mirrors the QPainterPath::simplified() function.
- Added support for collecting GPU timestamps for the QQuickWindow's rendering. When enabled by QQuickGraphicsConfiguration's setTimestamps() or the corresponding environment variable, GPU-side timings will appear in the debug output printed when enabling logging categories such as
qt.scenegraph.time.renderloop, and in Qt Quick 3D's DebugView item, complementing the CPU-side timings. This is currently supported on Direct 3D 11, Metal, and Vulkan (assuming the underlying Vulkan implementation supported timestamp queries). Support for the rest of the 3D APIs is going to be introduced in future releases.
- Added live property to SpinBox. This controls whether the value is updated when the user edits the displayText.
- Added wrapped signal to Dial. This is emitted when the dial wraps around, i.e. goes beyond its maximum value to its minimum value, or vice versa.
- Added startAngle and endAngle properties to Dial. These properties control the start and end angle of the dial in degrees.
- Added LayoutItemProxy, a helper item for writing responsive layouts (in Technical Preview)
- Added uniformCellSizes, uniformCellSizes, uniformCellWidths and uniformCellHeights properties as applicable to each type of Layout (in Technical Preview)
- StackLayout will now update currentIndex if an Item is inserted or removed at an index less than or equal to the current index.
- Added experimental curve rendering backend, which will render curves with higher quality than the default geometry renderer and apply anti-aliasing without the use of MSAA. It can be selected using the Shape::preferredRendererType property.
- Added a QML API for creating TextureData procedurally called ProceduralTextureData. Previously this was only possible via C++ by subclassing QQuick3DTextureData.
- Added a QML API for creating mesh geometry procedurally called ProceduralMesh. Previously this was only possible via C++ by subclassing QQuick3DGeometry.
- It is now possible to import PLY files.
- Added support for creating 3D textures with QQuick3DTextureData.
- Added initial Renderer Extensions support. This is the first steps to allowing adding additional passes and enabling the customization of the built in render passes. View3D has a new property called extensions which takes an array of QQuick3DRenderExtension sub-classes. This is further supported using the helper functions in QQuick3DExtensionHelpers.
- A plugin for Mimer SQL was added
- MySQL/MariaDB gained the new connect options MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_TLS_VERSION, MYSQL_OPT_SSL_MODE
- The ODBC plugin now returns all native error codes in QSqlError
- QSqlQuery got two new functions boundValueName()/boundValueNames()
The QTextToSpeech class learned a few more tricks that are available with all engines:
- Applications can add multiple chunks of text to a synthesizing engine via enqueue.
- The new aboutToSynthesize signal gets emitted just before a chunk of text gets synthesized.
- Selecting one of the voices provided by the engine using a set of criteria is now easy with the findVoices member function. QML code can in addition use the VoiceSelector type as an attached property.
Not all new features are available with every engine. Applications can use the new Capabilities flag and engineCapabilities property to check which of the following new features the currently used engine supports:
- If the engine has the Synthesize capability, QTextToSpeech can now synthesize text into PCM data. The synthesize function can be used with a callable that receives chunks of PCM data when it has been synthesized.
- If the engine has the WordByWordProgress capability, QTextToSpeech emits the sayingWord signal for each word in the current chunk of text as it gets spoken.
- Response headers added to QWebEngineLoadingInfo.
- Made it possible to add additional response headers in QWebEngineUrlRequestJob.
- Added QWebEngineUrlScheme::FetchApiAllowed flag for enabling HTML5 Fetch API for custom url schemes.
- qWebEngineGetDomainAndRegistry() function to read effective top-level domain as Chromium/QtWebEngine sees it.
- Added QWebEngineSettings::DisableReadingFromCanvas setting to disable canvas reading for extra protection against fingerprinting.
- QWidget got a new setTabOrder() overload that takes an initializer list, allowing the entire chain to be set with a single call.
- QMessageBox::Option provides the means to control for each message box whether a native message box should be used.
- Building user projects or Qt for macOS itself now requires at least CMake version 3.21.1.
- QMessageBox::setCheckBox() is now respected when using native message boxes.
- QFileDialog no longer triggers permission dialogs needlessly.
- Added FileProvider support when using QDesktopServices::openUrl().
- Added AndroidX by default (a dependency for FileProvider).
- Introduced QTP0002 CMake policy for android-specific target properties.
- Updates for the list of examples that are supported on Android.
- Android 13 as the maximum supported version
- Updated Gradle to version 8.3.0.
- QFileDialog takes all provided name filters into effect and not only the selected one.
- Updated Android target SDK level to 33 to match Play Store requirement for 2023.
- Added support for QWindow::setMask() for masking rendering and input.
- Added support for foreign windows, for embedding UIViews into QWindows.
- Support was added for Yocto 4.2 (mickledore).
- The Support Levels for Target Hardware were updated with new supported boards:
- Tier 1 support for the NXP i.MX 93 board added.
- Tier 1 support for the Jetson AGX Xavier board added.
- Tier 3 support for the NXP i.MX 8QuadXPlus board added.
- Tier 3 support for the Toradex Apalis iMX8 board added.
- Toradex and ST targets are now using latest Yocto LTS version (kirkstone).
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.