Qt 5.11 的新功能
Qt 5.11 中的新特征
Qt Core 模块
-
添加
QIODevice::NewOnly
and
QIODevice::ExistingOnly
OpenMode
flags. When used with
QFile
,
NewOnly
instructs
open()
to (atomically) return
false
if the file to open exists.
ExistingOnly
instructs
open()
to (atomically) return
false
if the file does not exist.
-
QFloat16 now has two methods for bulk conversion between
float16
and
float
, using hardware SIMD acceleration if available at runtime.
-
QVarLengthArray
now has rvalue reference versions of prepend and insert, and can hold movable-only datatypes such as
std::unique_ptr
.
-
QVector
now has rvalue reference versions of prepend and insert.
-
QUuid
toString()
and
toByteArray()
now take a parameter specifying the generated format.
-
Updated Unicode support in
QString
,
QChar
,和
QTextBoundaryFinder
to be compatible with Unicode 10.
Qt Network 模块
-
ALPN (via Secure Transport) and thus HTTP/2 negotiation are now supported on iOS (starting from version 11).
-
QNetworkRequest
now has the
Http2DirectAttribute
to start a connection in HTTP/2 without first negotiating.
Qt QML 模块
-
The compiler pipeline is rewritten. We now directly generate byte code from the AST, and store that as our intermediate representation.
-
Optimized handling of JS calls, bringing large improvements especially when calling small functions.
-
Newly written byte code interpreter brings significant performance improvements, at 80-90% of the JIT in Qt 5.10.
-
.qmlc
files are now fully platform-independent and store byte code instead of assembly.
-
New hotspot JIT that generates optimized assembly for byte code that gets repeatedly executed.
-
CONFIG += qtquickcompiler
now also works in the open source version, by embedding the generated byte code at compile time.
Qt Quick 模块
-
Expanded support for loading compressed textures in Image element. Now supports both
.ktx
and
.pkm
container file formats.
Qt Quick Controls 2 模块
-
AbstractButton
-
ButtonGroup
-
添加
checkState
property. It indicates the combined check state of the entire group.
-
CheckBox
and
CheckDelegate
-
No longer force tristate to
true
when setting
checkState
to
Qt.PartiallyChecked
. This allows presenting a partially checked state without being interactively tri-state.
-
No longer consider partially checked as checked. This fixes check state cycling for a non-tri-state checkbox so that it goes from partially checked to fully checked state.
-
Made it possible to implement
nextCheckState()
in QML.
-
ScrollBar
and
ScrollIndicator
-
添加
minimumSize
,
visualSize
,和
visualPosition
特性。
-
SpinBox
-
添加
displayText
property to allow styles to create a light binding to display the textual value instead of having to call the
textFromValue()
JS-function.
Qt 3D 模块
-
Scrub through animations with the
normalizedTime
property of QAbstractClipAnimator.
-
Issue arbitrary ray casts in world space or screen space.
-
Improved SIMD support.
Qt Location 模块
-
New Qt.labs.location plugin containing experimental QML types.
Qt WebEngine 模块
-
Updated to Chromium 65.
-
Embedded DevTools without using a port and separate browser.
-
Installable cookie filter.
-
Quota permissions.
QDoc 文档编制生成器
-
QDoc
now uses libclang for parsing C/C++ code.
-
Added support for ID-based translations.
Qt GUI 模块
-
On Windows Desktop, the accessibility support was updated and vastly improved. The implementation is now based on Microsoft UI Automation (it was formerly based on Microsoft Active Accessibility).
-
The widgets themes available on Windows Desktop were updated to better support High-DPI displays, including fixes for several rendering issues, providing improved appearance and functionality.
-
Linux Printing now supports more CUPS options with the advanced tab in QPrintPropertiesDialog, allowing many additional settings (amongst them arbitrary page ranges).
-
Updated the Unicode bidirectional text algorithm to be compliant with Unicode 10.
-
Added quick text selection by mouse to
QLineEdit
.
Qt Serial Bus 模块
-
Added J2534 Pass-Thru CAN plugin for communication between a computer and a vehicle.
-
Added description, serial number and channel to
QCanBusDeviceInfo
, as far as supported by the various plugins.
-
Introduced categorized logging to the CAN bus module which can be enabled by the
"qt.canbus"
and
"qt.canbus.plugins.<pluginname>"
filters.
-
QCanBusFrame::isValid
() now checks for invalid CAN FD payload lengths. E.g. 24 is a valid CAN FD payload length, but 28 is not.
Qt Bluetooth 模块
-
Ported Bluetooth Low Energy Central role implementation to
BlueZ
's DBus LE API (minimum version to enable is
BlueZ
5.42).
新模块
No new modules were added in this version.
-
MSVC2013 support removed from the code base.
-
Qt WebEngine now requires MSVC 2017 on Windows.
-
QNX 6.6 no longer supported (note: QNX 7 remains fully supported).
-
macOS 10.10 no longer supported.
-
Improved Accessibility support on Win32 by adopting the Windows UI Automation framework.
-
XCB: Support for missing 'dead keys' such as dasia and diaeresis.
-
eglfs
-
Added support for framebuffer formats other than XRGB8888 (RGB565, ARGB8888).
-
Added experimental screen cloning support (by scanning out the same framebuffer on multiple displays).
-
Added support for operating with DRM render nodes (/dev/dri/renderDnn) in a headless mode transparent to applications.
-
Added a makespec for Renesas R-Car M3.
-
Added experimental backend for compositing Qt content with other hardware layers via VSP2 on Renesas devices.
技术预览模块
-
Qt Remote Objects (TP3) - A module that allows you to easily share
QObject
interfaces (Signals/Slots/Properties) between processes or devices.
-
Qt WebGL Streaming Plugin (TP2) - Stream applications to browsers over the network.
弃用模块
The following modules are part of the Qt 5.11 release, but are deprecated and considered for removal in subsequent releases of Qt:
-
Qt Script
-
Qt Quick Controls 1
API 变化列表
以下页面包含 Qt 5.11 中的 API 变化列表:
其它 Qt 5 发行的补充