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 發行的補充