Qt 6.5 的新功能
New and Restored Modules in Qt 6.5
Qt 6.5 adds the following modules and tools:
技术预览中的新模块和恢复模块
注意:
不保证 API (应用程序接口) 和 ABI (应用程序二进制接口) 的稳定性。
-
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 模块
-
QTimeZone
can now package a
Qt::TimeSpec
and, when relevant, an offset in a lightweight time representation that unifies the various APIs of
QDateTime
and
QDate
that took either a
QTimeZone
或
Qt::TimeSpec
and offset.
-
引入
application permissions
API to allow applications to check or request permissions for features that require user consent before use.
-
New cross-platform tracing backend in Common Trace Format (CTF).
-
QBindable
can now be constructed from any property with a NOTIFY signal. This lets you integrate existing, non-bindable properties with
bindable properties
.
-
The
qt_generate_deploy_app_script
CMake function preferably accepts an argument called OUTPUT_SCRIPT now. Passing the old FILENAME_VARIABLE is deprecated.
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 模块
-
TableView
got support for editing cells using an edit delegate.
-
TableView
got support for resizing rows and columns using the mouse.
-
TableView
got support for setting row and column sizes explicitly.
-
TableView
got a new signal
layoutChanged()
. This signal can be used to, for example, reposition overlay items.
-
TableView
got support for doing multi-selections.
-
Added support for specifying separate RGB and alpha blend factors in a
QSGMaterial
.
-
The Qt Quick scenegraph is now automatically using persistent, disk-based caching of graphics pipelines or the intermediate format shader bytecode, depending on the platform and the 3D graphics API in use. This is expected to reduce the time spent on creating the graphics pipeline in subsequent runs of the application. In addition,
QQuickGraphicsConfiguration
provides explicit control over if and where this data is written out and loaded from. This enables advanced use cases such as shipping a pre-seeded cache file with an application or device, which also accelerates first-time startup.
-
PinchHandler
has new
scaleAxis
and
rotationAxis
grouped properties, offering several new values, including the
activeValue
property which is new in all the handler axis groups. It also got the
activeTranslation
and
persistentTranslation
properties that
DragHandler
already had.
-
DragHandler
's
xAxis
and
yAxis
have new
activeValue
特性。
-
PinchHandler
's
activeScale
(which was previously called
scale
) is no longer restricted to the range between
minimumScale
and
maximumScale
: these limits apply only to
persistentScale
. Likewise,
activeRotation
(previously
rotation
) is no longer restricted to the range between
minimumRotation
and
maximumRotation
. These limits are applied the same way for native touchpad pinch gestures as on touchscreens.
-
TapHandler::exclusiveSignals
now lets you make the
singleTapped
and
doubleTapped
signals exclusive.
Qt Labs Animation Module
Qt Quick Controls 模块
-
TreeViewDelegate
got support editing tree nodes
-
The Material style was updated to
Material 3
.
-
Several controls received visual updates, so it is recommended to check how your application looks and adapt it accordingly:
-
Some new API was added:
-
Material.containerStyle
controls the style of the container used by the target control. It can be attached to any window or item, but only
TextField
and
TextArea
support it by default.
-
Material.roundedScale
controls the radius of rounded corners used on the target control. It can be attached to any window or item, but only the following controls support it by default:
-
The iOS style was finished
-
The new controls that were implemented for the iOS style for 6.5 are:
Qt Test 模块
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 脚本编译器
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.
-
The
qt_generate_deploy_qml_app_script
CMake function preferably accepts an argument called OUTPUT_SCRIPT now. Passing the old FILENAME_VARIABLE is deprecated.
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 模块
-
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 Qt Online 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: