Qt 6.10 的新功能

Qt 6.10 的新模块和还原模块

Qt 6.10 添加了下列模块和工具:

Qt 6.10 的新特征

Qt Core 模块

Qt DBus 模块

Qt Graphs 模块

Qt GRPC 模块

Qt GUI 模块

Qt HttpServer 模块

Qt Lottie Animation

  • Added support for solid, null and precomposition layers.
  • 添加 lottietoqml tool. This is an equivalent tool to svgtoqml and it converts Lottie files to Qt Quick scenes described in QML. It is currently in tech preview.
  • Added a plugin for VectorImage which enables it to load Lottie files in addition to SVG. This feature is tech preview and requires assumeTrustedSource to be set to true .
  • Added lottietoqml example and qtlottieviewer example to demonstrate usage of Qt Lottie Animation .

Qt Multimedia 模块

Qt Network 模块

Qt Protobuf 模块

Qt QML 模块

  • 添加新 TreeModel QML type that allows the definition of a tree structure in the QML file and works with TreeView .
  • 添加 SortFilterProxyModel QML type to sort and filter model data. This feature is in tech preview.
  • Added the delegateModelAccess property to DelegateModel and all views. You can now write through required properties into the model.
  • 添加 Synchronizer QML type. Synchronizer keeps two or more properties in sync without using bindings. This feature is in tech preview.
  • Added semicolon customization rules to qmlformat. You can now control whether semicolons are added to the end of JS statements.
  • Added new qmllint warnings focused on improving compatibility with Qt Creator, including checks for Qt Design Studio-specific limitations, additional JavaScript-related warnings, and several new warnings related to QML enums and imports.
  • Removed support for manipulation of complex row structures from TableModel .
  • Changed the order of the role and value parameters in TableModel::setData to resolve ambiguity.

Qt Quick 模块

Qt Quick Controls 模块

  • The FluentWinUI3 style has improved support for contrast themes on Windows 11.
  • 添加 SearchField Control

Qt Quick Dialogs 模块

  • Added property popupType which can be used to control whether a non-native dialog should open in a separate window or as an item in the existing scene. This has no effect when using native dialogs.

Qt Quick Effects Module

Qt Quick 3D 模块

  • Added emit-mode to shaped emitters to allow particles to be emitted based on the surface normals of the shape.
  • 实现 reversed emitters to enable particles to run from end time to begin time.
  • Several lightmap-related improvements and changes:
    • Introduced texels-per-unit based lightmap sizes, adding the Model::texelsPerUnit and Lightmapper::texelsPerUnit properties and replacing the now deprecated Model::lightmapBaseResolution 特性。
    • 引入 Lightmapper::source property to set one lightmap source for the whole scene, replacing and deprecating BakedLightmap::loadPrefix .
    • Added a builtin GPU-based Non-local Means (NLM) denoising for baked lightmaps, controlled via the Lightmapper::denoiseSigma 特性。
    • The lightmap baking window has been improved to show a progress bar and an estimation of time remaining.
    • Baking is now done in its own RHI context and does not block rendering of the running application.
    • RAM and VRAM usage has been decreased when baking certain scenes.
    • Added a lightmap viewer tool for debugging baked lightmap files via GUI or command-line.
  • Fixed color import for glTF2 baseColorFactor by correctly converting from linear to sRGB, aligning it with the spec.
  • 添加 CapsuleGeometry to QtQuick3D .Helpers with fixed textures, async creation support, and exposed uvProfile property.

Qt Quick 3D XR 模块

  • 暴露 method for requesting room scanning for spatial anchors.

Qt Quick 3D Physics 模块

Qt Quick VectorImage 模块

  • Added support for animated SVGs that matches animation support in Qt SVG.
  • 添加 API to indicate whether source file is trusted or not.
  • 添加 API to control animation behavior.
  • By including a plugin provided by Qt Lottie Animation , VectorImage can now also show Lottie files. This feature is regarded as tech preview and requires assumeTrustedSource to be set to true .

Qt Serial Port 模块

Qt Serial Bus 模块

Qt Sql 模块

Qt SVG 模块

  • Added support for CSS animations for fill-opacity, stroke-opacity, and opacity properties.
  • Added an example that demonstrates how to view SVG files.

Qt Test 模块

  • Data-driven benchmarks now identify both global and local data in plaintext names
  • Backtraces from lldb are now disabled on Apple Silicon
  • QTest prints floating-point values in a comparison, it now gives full precision and includes a hexfloat version

Qt VirtualKeyboard 模块

  • Added PURL and CPE information to the attribution files of 3rd party sources.
  • 添加拉脱维亚语键盘布局。

Qt WebEngine 模块

Qt WebView 模块

  • Added WebView2 plugin for the Windows platform. The new backend uses a native COM API from the Chromium based Edge browser called WebView2 . Therefore, you can now provide web content without shipping Qt WebEngine .

Qt Widgets 模块

Qt XML 模块

Qt Mqtt 模块

  • 添加对 WebSockets/Secure WebSockets 的支持

工具

QDoc 文档编制生成器

  • QDoc can now automatically add “view source” links to every C++ API declaration. Enable the feature with the new url.sources family of configuration variables ( url.sources.enabled , url.sources.rootdir , url.sources.linktext ).
  • QDoc now detects circular inheritance in QML types using Floyd’s cycle-finding algorithm and reports the problem instead of getting stuck in an infinite loop.
  • QML property groups defined in .qml files are recognised and shown as a single grouped property when you document them with \qmlproperty 命令。
  • Source files generated by Qt tools ( moc_ , uic_ , qrc_ , etc.) are now skipped automatically, which shortens QDoc build times on large projects.
  • The data type shown for a QML property inside a .qml file can now be overridden directly in the \qmlproperty command, even for non-aliased properties.
  • The documentationinheaders option is no longer offered as a technical preview; rather, it is considered stable. It was first introduced in Qt 6.9.
  • When generating DocBook output, QDoc now includes overload notes.
  • Overloaded signals and slots now include a contextual snippet to show their use.
  • QDoc can link against Clang libraries from LLVM 21.
  • The .index-files include the declared return type from \fn-commands. This is useful for multi-project builds, when authors override the return type of a function with auto .
  • You can now document your QML enumerations with the new \qmlenum command. QDoc creates a new section, QML Enumerations, in the generated documentation.
  • Code snippets indentation is now normalized, stripping out excess left margin whitespace. This means that snippets from source that is heavily indented (e.g. in a deeply nested series of if -statements) will present as if not nested.
  • QDoc now correctly parses template aliases with default parameters.
  • QDoc no longer auto-links to deprecated functions if there are non-deprecated alternatives.
  • You can prevent machine translation of strings using the new \notranslate-command .

Qt Linguist

  • Added support for organizing ID-based translations with custom labels in Qt Linguist and lupdate.
  • Introduced a QML form preview feature in Qt Linguist for visual validation of translations in context.
  • Updated Qt Linguist with a refreshed UI, including new icons, improved color palette, and better handling of dark mode.
  • lupdate and lrelease now support mixing ID-based and text-based translations within the same document.
  • Removed the Clang-based parser from lupdate.
  • Unified support for meta strings (comments like //: and //~) across different programming languages in lupdate.
  • Added new i18n examples to the documentation.
  • lrelease now provides the -fail-on-unfinished option to fail the build if there are unfinished translations.
  • 弃用 //= metastring comments to set IDs for text-based translations.

平台的变化

构建系统变化

  • Usage of a private Qt module Foo now requires a call to find_package(Qt6 COMPONENTS FooPrivate) to make the Qt6::FooPrivate 目标可用。
  • 添加 DISCARD_FILE_CONTENTS 选项到 qt_add_resources() .
  • The FILENAME_VARIABLE option of qt6_generate_deploy_[app_]script , which was deprecated in Qt 6.6.0, has been removed.
  • 添加 NO_PLUGINS 自变量对于 qt_deploy_runtime_dependencies . This turns off plugin deployment altogether.
  • Added the arguments INCLUDE_PLUGIN_TYPES , EXCLUDE_PLUGIN_TYPES , INCLUDE_PLUGINS ,和 EXCLUDE_PLUGINS to qt_deploy_runtime_dependencies .
  • Added arguments for selecting Qt plugins to qt_generate_deploy_app_script .
  • qt6_import_plugins doesn't have any effect anymore on plugin deployment with the CMake deployment API on Linux.
  • qt6_deploy_runtime_dependencies now supports the following plugin selection flags on Linux: INCLUDE_PLUGINS , INCLUDE_PLUGIN_TYPES , EXCLUDE_PLUGINS , EXCLUDE_PLUGIN_TYPES .
  • 添加 DISCARD_QML_CONTENTS 选项到 qt_add_qml_module() , that removes original QML and JS file contents from the target's resource system.

桌面平台

Windows

macOS

  • Windows that opt into extended dynamic range (EDR) now trigger expose event on screen brightness change
  • The titleUIElement accessibility property is now supported
  • Service menu integration is now rich-text aware
  • QOperatingSystemVersion::MacOSTahoe represents macOS 26
  • Mappings for WhatsThisCursor and BusyCursor have been added
  • QImage::toCGImage () now propagates the image's color space

Linux 中的 Wayland 客户端

移动平台

Android

Qt for Android
  • Updated Gradle to version 8.14.2 and Android Gradle Plugin AGP to version 8.10.1.
  • Added support for Android 12 Splash Screen.
  • Added support for Android 16KB page sizes.
  • Added an example (QtJennyDemo) for accessing Android APIs via C++ wrappers produced by a code generator (QtJenny).
  • Changed Android 16 (API 36) as maximum supported platform version.
Qt Quick for Android
  • Added multiple arguments support for signals under QtQuickView.
  • Added support to register signal listeners before QML is fully loaded.
  • Public Java APIs in javadoc format.

iOS

  • 添加 QPointingDevice support for Apple Pencil
  • Fixed rotation for standard Apple Pencil
  • Added support for hover feature for Apple Pencil 2nd gen or later
  • Windows that opt into extended dynamic range (EDR) now trigger expose event on screen brightness change
  • Update requests will now be paused when the app moves out of active state
  • QScreen now also reports inverted screen orientations
  • RLIMIT_STACK now reflects the effective stack size
  • QImage::toCGImage () now propagates the image's color space

嵌入式平台

Boot to Qt

实时操作系统

  • Real-time operating system support is provided only for LTS releases. For non-LTS releases, support is available exclusively through Professional Services.

Qt 6.10 弃用的模块

下列模块已弃用。强烈建议新代码不要使用它们。

The Qt Charts and Qt DataVisualization modules are deprecated. They continue to be part of the licensed software, and remain part of the Qt Project. However, for new code we recommend that you use Qt Graphs . Also, consult the documentation for {Qt Graphs Migration from Qt Charts}{migrating from Qt Charts} and migrating from Qt Data Visualization .

Qt 模块生命周期的更多有关信息,见 QUIP-14 .

API 变化列表

这些页面包含 Qt 6.10 的 API 变化概述:

已知问题

Qt 6.10 已知问题的有关信息,见 Qt Wiki .