Qt 6.9 的新功能
New Features in Qt 6.9
Qt Core 模块
Qt Graphs 模块
-
Added transparency support to
Surface3D
, utilizing order-independent transparency from
QtQuick3D
. Only approximate technique (WeightedBlended) has been implemented to
QtQuick3D
this far, so no accurate techniques can be used yet.
-
添加
rootNode
to allow injecting graphs to a
View3D
in
QtQuick3D
应用程序。
-
Added another picking method,
doRayPicking
, to be used with
View3D
graph injections.
-
添加
QSpline3DSeries
class to allow users render their data in splines.
-
添加
valueColoringEnabled
特性到
Bars3D
, which allows each bar to be colored separately based on its value.
-
添加
scaleLabelsByCount
特性到
QAbstract3DAxis
, allowing users to define whether axis labels should be scaled based on the total amount of labels.
-
添加
labelSize
特性到
QAbstract3DAxis
, allowing users to set the sizes of axis labels by each axis.
-
Added support for setting the minimum and maximum rotations in X and Y directions to
Bars3D
,
Scatter3D
,和
Surface3D
.
-
添加
alignment
特性到
QAbstractAxis
, allowing users to align axes left, right, top, or bottom.
-
Added plotArea property to QGraphsView, allowing users to define the rectangle a graph will be drawn in.
-
Added zooming and panning support to QGraphsView.
-
Added custom input handling support to area, line, pie, and scatter graphs.
Qt GRPC 模块
-
Added the Qt GRPC Client Guide overview example.
-
Improved and refined all documentation and examples.
-
Optimized streaming RPCs for writing under high load.
Qt GUI 模块
-
QBrush
and
QPen
got optimized operators for comparing with or assigning from color and style values.
-
QPainter::setBrush
() got new optimized overloads for setting a color as a solid brush.
-
QPainterStateGuard
is a new RAII class to ensure balanced save/restore operations on a
QPainter
.
-
QColorSpace
got APIs for setting and getting the four primary color space points.
-
添加
Qt::ExpandedClientAreaHint
to request that the window's client area is expanded to areas where it might be obscured by, or conflicting with other UI elements, such as the window's titlebar controls or other system UIs.
-
添加
Qt::NoTitleBarBackgroundHint
to request that the window's title bar is drawn without a background color.
-
添加
QWindow::safeAreaMargins
() to reflect the safe area of the window.
-
Added parsing and automatic detection of emoji sequences in text, ensuring the use of color fonts when needed as according to the Unicode specification. This parser can be disabled per layout using
QTextOption::DisableEmojiParsing
, or by disabling the emoji segmenter when configuring Qt.
-
添加
QFontDatabase::addApplicationEmojiFontFamily
() and related functions for customizing the default emoji font used by the application.
-
添加
QFontInfo::variableAxes
() for retrieving information about the variable axes supported by a font.
-
QImage::flipped
() 和
QImage::flip
() provide a
Qt::Orientation
based API for flipping an image, making code easier to read than the bool- based
QImage::mirrored
() alternative.
-
QRhi
: when running with OpenGL ES on mobile GPUs with support present, GL_EXT_multisampled_render_to_texture is utilized whenever possible. For clients such as Qt Quick and Qt Quick 3D this potentially brings significant performance improvements in multisampled rendering on tiled GPU architectures.
-
QRhi
: On Windows with Direct 3D 11 and 12,
QWindow
update requests are now driven by a dedicated vblank watcher thread, reducing CPU load and latency. This means that clients such as Qt Quick are expected to have a reduced lag when interactively dragging items by mouse or touch for example.
-
QRhi
: Added support for variable rate shading, where applicable (Direct 3D 12, Vulkan, Metal). This enables dynamic foveation support with Qt Quick 3D XR on visionOS.
-
QRhi
: Per-render target blending is now optionally supported for OpenGL as well.
-
QRhi
: Added support for a number of integer and depth texture formats.
-
QRhi
: Added support for passing in application-provided wait/signal semaphores when on Vulkan. These are then passed on to to vkQueueSubmit and Present, thus allowing integration of external rendering/compute engines that rely on multiple threads and require appropriate synchronization with the scenegraph renderer.
-
使用
QPdfWriter::author
() property to set the author of the generated PDF document.
Qt HttpServer 模块
Qt Network 模块
Qt Network Auth Module
Qt Protobuf 模块
-
Improved and refined all documentation.
-
添加
HEADER_GUARD
option to specify the mechanism used to guard generated header files.
-
添加
protobuf-unsafe-registry
feature to trade safety for performance on accessing custom protobuf serializers.
Qt QML 模块
-
QML Language Server now provides an outline view of the document structure. This allows clients (e.g., IDEs or code editors) to represent a qml document’s structure as an interactive outline, displaying objects, properties, methods and other code elements in a hierarchical view.
-
Added the maximum line length feature to qmlformat: qmlformat now controls where to break lines based on a maximum allowed line length, ensuring a consistent and readable QML document.
Qt Quick 模块
-
添加
SafeArea
attached property to manage safe areas of an Item or Window.
-
Added Shear component for a convenient way of applying shearing transforms to items.
-
添加
FontMetrics::capitalHeight
property, which was previously missing from the Qt Quick API.
-
添加
FontInfo
type for retrieving the results of font resolution, matching the
QFontInfo
class in C++.
-
Reintroduced support for the FramebufferObject rendering mode of
QQuickPaintedItem
when the graphics API in use is OpenGL. This is provided as a porting aid for Qt 5 era applications that require the use of
QPainter
's legacy OpenGL paint engine for their QQuickPaintedItems.
-
Optimized the scenegraph renderer's buffer pooling logic to prevent spikes in memory usage in scenes with large geometries. Additionally, there is a reduction in overhead for scenes with a lot of items, in particular when running with OpenGL.
Qt Quick Controls 模块
-
添加
ContextMenu
. This can be attached to any item in order to show a context menu upon a platform-specific event, such as a right click or the context menu key.
Qt Quick Effects Module
-
New
RectangularShadow
element for fast rounded rectangle shaped shadow/glow. The API is similar to CSS box-shadow, with color, offset, spread and blur values.
Qt Quick 3D 模块
-
Added WeightedBlended Order Independent Transparency (OIT) implementation for rendering transparent objects.
-
Added support for 32-bit unsigned integer texture formats.
-
Improved control over shadow map bounds for instancing models, potentially allowing for better performance when calculating becomes expensive.
-
Added support for 4K shadow maps with a new 'Ultra' resolution setting.
-
Added the option of forcing medium precision for floats in GLSL ES fragment shaders. Provided mainly as a tool for performance tuning. Set the environment variable QT_QUICK3D_MEDIUM_PRECISION to a non-zero value. Has no effect on other kinds of shaders (and that includes non-ES GLSL too).
-
DebugView
now supports visualizing bounds for point light shadows.
-
Ported the built-in geometries from Qt 3D to
QtQuick3D
.Helpers.
PlaneGeometry
,
SphereGeometry
,
CylinderGeometry
,
ConeGeometry
,和
TorusGeometry
are now available in
QtQuick3D
.Helpers.
-
Added a port of the
ExtrudedTextMesh
from Qt 3D to
QtQuick3D
.Helpers.
-
Added support for using instancing with custom materials in the material editor.
Qt Quick 3D XR 模块
-
Added support for haptic output with controllers using amplitude, duration, and frequency through a new
XrHapticFeedback
项。
-
Added new property in
XrInputAction
to conditionally disable an action without having to test for it in all the handler functions.
-
Added Metal backend for OpenXR to support running in Meta XR Simulator on macOS.
-
The property
multiViewRenderingEnabled
is now read-only and toggling multiview rendering is no longer possible at run-time. If multiview rendering is supported, it is enabled for the lifetime of the application. In porting situations, where multiview rendering is not desired, it can be disabled by setting the environment variable QT_QUICK3D_XR_DISABLE_MULTIVIEW to a non-zero value.
Qt Quick VectorImage 模块
-
Added preliminary support for color animations and transform animations, matching the current support in Qt Svg.
Qt Sql 模块
Qt SVG 模块
-
Added three new values to
QtSvg::Options
to disable animations.
-
Support CSS animation for fill, stroke, and transform properties.
Qt VirtualKeyboard 模块
-
Added a new Japanese layout which uses flick keys.
-
Added support for adjusting key sound volume.
Qt WebEngine 模块
-
QAbstractItemView
got a new property
updateThreshold
to specify when a full view update should be done instead trying to figure out the parts where something changed within dataChanged(). This is especially useful when a lot of items change in a large model as the update rect calculation might take longer than a full view update.
-
QComboBox
can draw its label using the item view's delegate by setting the
labelDrawingMode
特性到
UseDelegate
.
-
QHeaderView
has been optimized to dramatically reduce memory usage for huge models as long as the sections are not resized, hidden or reordered.
-
The identifier set as the
QWidget::accessibleIdentifier
can be used by assistive technologies and by automated testing tools to identify a specific widget.
-
The dock location of a
QDockWidget
can not be explicitly set using the
QDockWidget::dockLocation
特性。
-
QStackedWidget
now emits the
widgetAdded
() signal when a new widgets is added to the stack.
Qt XML 模块
QDoc 文档编制生成器
-
QDoc now accepts formatting commands in macro arguments.
-
Authors can now override the underlying return type of a function that's documented with an
fn
-command with
auto
.
-
QDoc can now generate documentation from comments in C++ headers. This is added as a technical preview in QDoc with Qt 6.9, and we'd love to get feedback from our users. Enable the
documentationinheaders
QDoc configuration variable to try it out.
-
QML enumeration documentation can be generated from C++ enumerations with the new
qmlenumeratorsfrom
命令。
-
The
generatelist
and
annotatedlist
commands now support custom sort order for the generated lists.
-
弃用
accepts future versions, and QDoc generates appropriate text when it recognizes a version as being in the future.
-
Clang library requirements: QDoc requires Clang libraries from LLVM 17. It's also confirmed to work with Clang libraries from LLVM 18, 19, and 20.
-
QDoc now supports adjusting the CMake requisites for third-party projects with the
cmakecomponent
,
cmakepackage
,和
cmaketargetitem
命令。
-
Example-related warnings are now configurable through the new
examples.warnaboutmissingimages
and
examples.warnaboutmissingprojectfiles
configuration variables.
-
QDoc can now generate tooltips for images in your documentation. The documentation for the new
usealttextastitle
configuration variable describes how to enable this for your project.
构建系统变化
-
Building Qt and using Qt in CMake projects now requires CMake version 3.22 or later.
Windows
-
添加新的公共 CMake API:
-
Added support for rendering additional emoji font formats, such as CBDT and COLRv1.
Linux 中的 Wayland 客户端
-
Added support for the new
xdg-toplevel-icon-v1
protocol to make
QWindow::setIcon
() work if the compositor supports this protocol as well.
-
The underlying
wl_surface
of a window now shares its lifetime and is no longer destroyed when the window is hidden.
Android
-
Support uncompressed native libs within APKs and remove the need for
packagingOptions.jniLibs.useLegacyPackaging true
.
-
Introduce
qt_add_android_permission
() CMake function.
-
添加
QT_ANDROID_COMPILE_SDK_VERSION
CMake property to set the SDK level for building Java code.
-
添加
QT_ANDROID_APP_ICON
CMake property to set an app's icon.
-
添加
QT_ANDROID_APP_NAME
CMake property to set an app's name.
-
Decouple location and bluetooth permissions for API level 31+.
-
Allow setting a maximum for queued background UI events.
-
Add script to easily deploy, run apps and get logs from terminal.
-
Qt Quick for Android
and QtQuickView:
-
Add setData() and dataChanged() methods to QtAbstractItemModel.
-
Add OnDataChangedListerner callback interface.
-
QtQuickViewContent: Add onStatusChanged() overload that passes the underlying QtQuickViewContent object.
-
Support multiple embedded views from an Android Service.
Boot to Qt
-
Support was added for Yocto 5.1 (Styhead).
-
The
目标硬件的支持级别
was updated with new supported boards for Tier 1:
-
NVIDIA Jetson AGX Orin Developer Kit (
Boot to Qt
, upgraded from Tier 2).
-
The
目标硬件的支持级别
was updated with new supported boards for Tier 2:
-
Toradex Apalis iMX6 (
Boot to Qt
, downgraded from Tier 1).
-
The
目标硬件的支持级别
was updated with new supported boards for Tier 3:
-
Qualcomm RB3 Gen 2 Vision Kit (
Boot to Qt
).
-
NXP i.MX 8M Mini LPDDR4 EVK (
Boot to Qt
, downgraded from Tier 2).
-
NXP i.MX 8M Nano LPDDR4 EVK (
Boot to Qt
, downgraded from Tier 2).
-
NXP i.MX 8M Plus LPDDR4 EVK (
Boot to Qt
, downgraded from Tier 2).
-
The following boards are no longer supported:
RealTime OSs
-
RealTime OS support is provided only for LTS releases. For non-LTS releases, support is available exclusively through Professional Services.
API 变化列表
These pages contain an overview of API changes in Qt 6.9: