Qt 6.5 的新功能

New and Restored Modules in Qt 6.5

Qt 6.5 adds the following modules and tools:

New and Restored Modules in Technical Preview

注意: API and ABI stability is not guaranteed.

  • Qt Location 's Map renders 2D maps into a Qt Quick application. MapView 包括 Qt Quick 输入处理程序 to implement the typical interactive features (zoom, pan, tilt).
  • Qt GRPC supports communicating with gRPC services using classes generated based on service descriptions from protobuf .proto-specifications.
  • Qt Protobuf supports generating, serializing, and deserializing Qt-based classes from protobuf .proto-specifications.

New Features in Qt 6.5

Qt Core 模块

Qt GUI 模块

  • Reintroduced classes QWindowsMimeConverter and QUtiMimeConverter for handling drag'n'drop and clipboard data in platform specific formats on Windows, macOS, and iOS.
  • QVulkanInstance now enables Vulkan Portability physical devices by default. This is required to be operational with newer MoltenVK versions on Apple platforms. Added a NoPortabilityDrivers flag that lets you opt out from this.
  • The Vulkan rendering infrastructure is now using VK_EXT_debug_utils instead of the deprecated VK_EXT_debug_report and VK_EXT_debug_marker.
  • QTextLayout::glyphRuns () can now return the string index corresponding to each glyph when this is requested. Made available through the new function QGlyphRun::stringIndexes ().
  • Checkbox list items can now be read and written in HTML as well as Markdown, including conversions.
  • 添加 QGuiApplication::setBadgeNumber () to provide feedback to the user about the number of unread messages or similar. The badge will be overlaid the application's icon in the Dock on macOS, the home screen icon on iOS, or the task bar on Windows.

Qt Quick 模块

Qt Labs Animation Module

Qt Quick Controls 模块

Qt Test 模块

Qt Widgets 模块

Qt Positioning 模块

Qt Serial Bus 模块

All new classes are experimental and are subject to change.

Qt Network 模块

  • 引入 QHttp1Configuration . The class can be used to configure the maximum number of connections used per host when using HTTP 1 (default: 6).
  • QNetworkRequest on Qt for WebAssembly gained the UseCredentialsAttribute attribute, enabling withCredentials for the underlying XMLHttpRequest .

Qt QML 模块

  • Added API to QQmlApplicationEngine and QQmlComponent to load/create QML elements via their module URI and type-name. In contrast to the URL based functions, this also works with C++ types and inline components.
  • QQmlListProperty properties now behave more like arrays, gaining support for methods like map(), reduce() and forEach(). The same holds for other sequence types, like QList <int> and similar.
  • Extended the qmltc to support more qml constructs, notably translation bindings, inline components, singletons, and signal handlers for C++-defined signals.
  • The QML Script Compiler can handle additional constructs. In particular:
    • console.log() and friends
    • let and const
    • qsTr() and friends
    • arg() for strings
    • all the remaining bitwise and shift operators
    • the exponentiation operator
  • QML 磁盘缓存 can be controlled in a more fine-grained way using the new environment variable QML_DISK_CACHE .
  • 添加新的公共 CMake API:
    • 引入 Qt CMake policy to set a better default for the resource prefix. If QTP0001 policy is set to NEW , the QML engine will always be able to find your QML modules in the resource file system.

Qt Quick 3D 模块

  • Added automatic level of detail (LOD) support for models. This allows generating simplified versions of the meshes during asset import and then automatically picking the appropriate level when rendering.
  • Added explicit level of detail (LOD) support to control the opacity of models based on the camera distance.
  • 添加 ExtendedSceneEnvironment , with built-in effects for depth of field, color grading, glow, vignette, lens flare, and others. These effects are performed together, increasing efficiency compared to individual, stand-alone post-processing effects, each requiring one or more render passes.
  • Enhanced DebugView with rendering statistics, the list of active mesh and texture assets, and live render pass information, as well as controls to interactively toggle settings, such as wireframe mode and material overrides from DebugSettings .
  • 添加 DebugSettings , available via SceneEnvironment , allowing programmatic control over settings such as wireframe mode and material overrides to only render certain aspects of physically based materials.
  • 添加 InfiniteGrid , implementing an infinite grid in the horizontal plane with fade out.
  • Added built-in, simple fog support, available via SceneEnvironment . When enabled, this applies a depth or height fog effect when rendering the models in the scene.
  • Improved picking when instanced rendering is used.
  • Added vertex color support for PrincipledMaterial and SpecularGlossyMaterial
  • Reflection probe: added support for using a provided cubemap texture instead of rendering the scene.
  • Post-processing effects were enhanced to properly react to changes in shader source file URIs at run time.
  • Added persistent, disk-based caching of runtime-generated material shader data. This is expected to improve application startup and view change times.

Qt WebView 模块

Qt Multimedia 模块

  • The ffmpeg media backend, being a technical preview in 6.4, becomes the default for macOS, Windows, Android, and Linux except for Yocto distribution. The native backends are still available with limited support.
  • 引入 QScreenCapture class that is a new type of video input. It's possible to direct video from QScreenCapture through QMediaCaptureSession to outputs, e.g. QMediaRecorder or QVideoWidget . The screen capture functionality is available only with the ffmpeg media backend.

平台的变化

WebAssembly

  • Added binary package with multithreading enabled to the Qt installer.
  • 添加支持 File System Access API. File dialog calls such as QFileDialog::getOpenFileContent () 和 QFileDialog::saveFileContent () will now use this API, if supported by the browser.
  • 添加支持 Local Font Access API. Qt will now use local fonts on browsers which support this API.
  • Added tech preview of video playback and camera support to Qt Multimedia.
  • Added configure option for WebAssembly SIMD: -feature-wasm-simd128
  • Added configure option for WebAssembly exceptions: -feature-wasm-exceptions
  • Published Qt Web Utils with utility functions and Qt on web usage examples.
  • QTest for WebAssembly now uses emrun by default. A specialized script for WebAssembly drives the execution of automatic tests.

桌面平台

Windows

  • The environment variable QT_WIN_DEBUG_CONSOLE can be set to see stdout/stderr messageges in a console window for GUI applications that are started from the command line. Set it to new or attach .

macOS

Linux 中的 Wayland 客户端

  • Now supports fractional_scale_v1 protocol for compositors that suggest fractional scale factors for the client.

移动平台

Android

  • Updated Gradle to 8.0 and the Android Gradle Plugin (AGP) to 7.4.1 (requires JDK 11 or above).
  • Updated NDK to r25b (25.1.8937393).
  • The list of supported versions is now Android 8.0 (API 26) or later.
  • Bump the minimum platform build sdk version to 33 (QT_ANDROID_API_VERSION).
  • Support more operations on content scheme URIs with Qt file/dir facilities.
  • Fixes and documentation updates for QStandardPaths under Android Scoped Storage.
  • Print Qt JNI exceptions from Qt and not the Android System.
  • Fixed support for APK Signature Scheme v2.

iOS

嵌入式平台

Boot to Qt

  • Boot to Qt stack was updated to use yocto 4.1.2 (langdale).
  • Support for macOS host using Docker-based toolchains.
  • The 目标硬件的支持级别 were updated and there are now multiple levels of support that apply across specific hardware and OS combinations.

API 变化列表

These pages contain an overview of API changes in Qt 6.5: