Qt 5.14 的新功能
Qt 5.14 中的新特征
Qt 3D 模块
Qt Bluetooth 模块
-
Introduced a new, optional Win32 backend with support for Windows 7 and 8. This backend is not built by default, nor is it part of the pre-built packages.
-
QLowEnergyController
:引入
AuthorizationError
.
-
Added the ability to include multiple manufacturer data entries per manufacturer ID.
Qt Core 模块
-
Added support in
QCalendar
for calendars other than Gregorian, by implementation of suitable backends.
-
Added backends to implement the Gregorian, Jalali (Persian), Islamic Civil, Milankovic, and Julian calendars. We look forward to other contributions.
-
添加
QColorConstants
, a namespace providing constexpr
QColor
instances that don't cost any runtime overhead.
Qt GUI 模块
-
更新高 DPI 支持:
-
Introduced non-integer scale factors (for example, a scale factor of 150%) that applications can opt-in to use. Use
QGuiApplication::highDpiScaleFactorRoundingPolicy
or QT_SCALE_FACTOR_ROUNDING_POLICY to set the rounding policy.
-
Added the QT_ENABLE_HIGHDPI_SCALING environment variable, enabling high-DPI scaling based on display DPI. This replaces QT_AUTO_SCREEN_SCALE_FACTOR (now deprecated), and corresponds to the
Qt::AA_EnableHighDpiScaling
应用程序属性。
-
Added cross-platform support for the QT_FONT_DPI environment variable, for the purpose of developing and testing with specific DPI values.
-
Added color-space support for images; reading and writing color-spaces from JPEG, PNG, WebP and TIFF images, and performing color-space transformation on images.
-
Improvements to
QTextDocument
and
QTextTable
styling:
-
Added per-edge border styling via
QTextTableCellFormat
.
-
Added border-collapse mode.
-
Added support for (partial) HTML table style import and export.
-
将 Markdown 格式读写支持添加给
QTextDocument
,作为 HTML 的替代。
Qt Network 模块
-
引入 HTTP/2 配置 API。
-
引入网络连接监视。
-
将 SPNEGO/协商代理身份验证支持添加给
QAuthenticator
。这要求 KRB5 GSSAPI 起作用。
Qt QML 模块
-
添加
qmlRegisterSingletonInstance
() function. This allows to expose a
QObject
as a singleton to QML, without having to create a factory function as required by
qmlRegisterSingletonType
(). It is meant as a type safe replacement of setContextProperty() in common usages.
-
添加
qmlRegisterAnonymousType
() as a replacement for qmlRegisterType(). It allows to specify the URI and major version, which enables better tooling support.
-
Added an experimental -U option to
qmllint
. When set, access to unqualified identifiers generates warnings.
Qt Quick 模块
-
Added a preview of the graphics API independent scenegraph renderer as an opt-in feature. This allows running qualifying Qt Quick applications on top of Vulkan, Metal, or Direct3D 11, instead of OpenGL. Currently supported platforms:
-
Windows 10 (Direct3D)
-
Linux with X11/xcb (Vulkan)
-
macOS (Metal or Vulkan with MoltenVK)
-
Android 7.0+ (Vulkan)
-
Added support for the Markdown format (including CommonMark and GitHub dialects) to
Text
and
TextEdit
as an alternative to HTML. This includes the GitHub checklist extension, allowing to toggle checkboxes in a
TextEdit
.
-
切换
TextEdit
to use an
I-beam cursor
by default, and a
pointing-hand cursor
when hovering over a checkbox or a link. Default cursors can be overridden.
-
添加
WheelHandler
, an event handler for the mouse wheel, and optionally for emulated mouse wheel events coming from a trackpad.
-
添加
BoundaryRule
in Qt.labs.animation: a PropertyValueInterceptor that restricts the range of values a numeric property can have, applies "resistance" when overshooting a value, and provides the ability to animate it back to its normal range. It's particularly useful in combination with
WheelHandler
, providing physics similar to
Flickable
.
-
添加
currentFrame
and
frameCount
properties to
Image
and
BorderImage
, just as
AnimatedImage
has; for example, this allows choosing an individual icon from an .ICO file that contains multiple icons.
-
添加
PathPolyline
and
PathMultiline
as additional ways of drawing and/or filling arbitrary polygons and sets of polygons with Qt Quick Shapes.
Qt Serial Bus 模块
Qt Test 模块
-
引入
initMain()
function to perform any initialization that must happen before
QApplication
exists.
Qt WebEngine 模块
-
Added support for the Markdown format (including CommonMark and GitHub dialects) to
QTextEdit
and
QTextBrowser
as an alternative to HTML. This includes the GitHub checklist extension, allowing to toggle checkboxes if the widget is editable.
QTextBrowser::setSource
() detects Markdown based on the file extension.
Android
-
Android 现在要求 NDKr20+。
-
Added multi-ABI build in one go. By default, all Android supported ABIs (arm64-v8a, armeabi-v7a, x86_64, x86) are built.
ANDROID_ABIS
qmake variable can be used for selecting specific ABIs.
-
Added support for the new AAB package format, which allows Google Play deployment of a single application bundle containing binaries for all supported ABIs.
新模块
技术预览模块
Qt for Automation 模块
Qt KNX
-
扩展支持 KNXnet/IP Core V2 (探索、隧道、路由和安全性)。
Qt MQTT
-
添加支持,为使用
QSslConfiguration
when creating encrypted connections.
-
添加
autoKeepAlive
property to enable manual connectivity checks.
Qt OPC UA
-
添加 GDS 客户端支持作为技术预览。
-
将第 3 方 open62541 实现更新到第 1.0 版。
Qt CoAP
弃用模块
下列模块是 Qt 5.14 发行的一部分,但被弃用且在后续 Qt 发行中考虑移除:
-
Qt Script
-
Qt Quick Controls 1
-
Qt XmlPatterns
API 变化列表
以下页面包含 Qt 5.14 中的 API 变化列表:
其它 Qt 5 发行的补充