Qt 5.9 的新功能

Qt 5.9 是 LTS (长期支持) 发行。

Qt 5.9 中的新特征

Qt Core 模块

  • 添加 qfloat16 f and qfloat16 &f overload functions to the QDataStream class for writing a floating point number to the stream and reading it from the stream.
  • Made the QProcessEnvironment class available on iOS, tvOS, watchOS, and VxWorks .
  • QRegularExpression now requires the PCRE2 library version 10.20, or later. Support for the PCRE1 library was dropped. A copy of PCRE2 is shipped with Qt and will automatically be used on the platforms that lack it.
  • 添加 QOperatingSystemVersion class to provide convenient access to the operating system and version.

Qt GUI 模块

Qt Multimedia 模块

Added the following QML properties:

Qt Network 模块

Qt QML 模块

  • Added support for ahead-of-time generation of QML type caches.

Qt Quick 模块

  • Enabled caching OpenGL shader program binaries used by the Qt GUI module ( QPainter 's GL paint engine) and the Qt Quick scenegraph on disk to improve application-startup and view-initialization times.
  • Added an OpenVG backend for Qt Quick.
  • Enabled making window-screen associations directly from QML by using Window.screen and Qt.application.screens . This enables creating multi-screen aware applications for desktop and embedded without involving C++ code.
  • Added a way to query information about the font actually used to render a Text 类型。
  • Added an image provider that can share decoded image data and memory between processes.

Qt Quick Controls 2 模块

Qt 3D 模块

  • Added rendering Qt Quick 2 scenes to a texture and interacting with them within a 3D world.
  • Added a Technical Preview of a new animation subsystem that enables non-blocking, keyframe animations on the threadpool and exporting from animations from Blender.
  • Added Physics Based Rendering (PBR) material ( QMetalRoughMaterial and QTexturedMetalRoughMaterial ) 到 Qt3DExtras for improved appearance when used with environment maps.
  • Added 3D text support to Qt3DExtras .
  • 添加 LevelOfDetail type to control the representation of an entity based on distance from the observer or size on the screen. It comes with a convenience loader class that loads different QML files.
  • Made the Mesh type plugin based. It comes with plugins for the Wavefront OBJ, PLY and FBX formats and makes it easy to add other formats.
  • Added distance field based 2D textured text that can be freely rotated but is based on planar geometry.

Qt Bluetooth 模块

  • Added Classic Bluetooth support for WinRT .
  • Added Bluetooth LE Peripheral support for Android.

Qt Charts 模块

  • Added support for minor grid lines for logarithmic axes.
  • Added options for legend marker shapes to QLegend::MarkerShape .
  • Added support for adding more than one bar series to a chart.

Qt Location 模块

  • Added support for rotating and tilting maps.
  • Added touch gestures for rotating and tilting maps.
  • Improved support for stacking multiple Map 类型。
  • 添加 MapCopyrightNotice type to flexibly position the copyrights of multiple map elements on top.
  • Enabled styling the HTML copyright using CSS.
  • Added support for handing the rendering of map items to the plugin.
  • 添加 MapboxGL plugin that is based on the mapbox-gl-native mapping engine.
  • 添加 Map::fitViewportToVisibleMapItems () method to only consider visible items when fitting the viewport.
  • 添加 MapItemGroup type to combine multiple map items in a separate QML file.
  • 添加 Map.fieldOfView property to control the camera's field of view when the map is tilted.
  • Added the MapParameter type to expose and control plugin-specific runtime functionality.

Qt NFC 模块

  • Enabled using NFC when running as an Android service.
  • Added support for communicating with ISO-DEP, NFC-A, NFC-B, NFC-F, and NFC-V tags or smartcards, such as the German eID card, using QNearFieldTarget::sendCommand () on Android.

Qt SerialBus 模块

Qt Virtual Keyboard 模块

  • Added support for selection handles for the dedicated (desktop) keyboard.
  • Changed the behavior of the shift handler to only activate caps lock if the shift key is double-clicked.
  • Added support for external keyboard layouts, which allows overriding and exclusion of the built-in keyboard layouts.
  • Added a language selection popup for faster selection of the input language.
  • Added support for the automatic selection of the only remaining word in the suggestion list.
  • Made the word candidate list automatically hidden when inactive.
  • Added full screen input mode.

Qt WebEngine 模块

  • 基于 Chromium 56。
  • Switched internally to the new Chromium build-system GN.
  • Added loading with HTTP POST.
  • Added support for user scripts with QQuickWebEngineProfiles and for using QQuickWebEngineUserScripts from C++.
  • DownloadItems now get a reason when they are interrupted or fail.

Qt WebSockets 模块

嵌入式平台

  • Added experimental DRM dumb buffer support to the linuxfb platform plugin, to help devices that do not support the deprecated fbdev model (or have problems with fbdev emulation).
  • Added support for filtering and prediction of touch events to the evdevtouch 插件。

新模块

  • Qt Gamepad - Enables Qt gaming applications to respond to gamepad input.

This module was previously released as a technology preview and is now a fully supported Qt add-on module.

技术预览模块

  • Qt Network Authorization - Online authorization support with OAuth protocol, versions 1 and 2.
  • Qt Remote Objects - Sharing QObject interfaces (signals, slots, and properties) between processes or devices,
  • Qt Speech - Text to speech and speech recognition functionality. Currently only the text to speech features are released. Includes backends for several speech synthesizers on Windows, Linux, macOS, and Android.

平台的变化

  • Removed support for WinRT on Windows 8.1.
  • Debug builds on GCC platforms now use -Og optimizations by default. This can be disabled with the configure flag -no-optimize-debug .

弃用功能

  • Qt Script

Deprecated modules are still included in Qt 5.9, but are considered for removal in future releases.

API 变化列表

以下页面包含 Qt 5.9 中的 API 变化列表:

其它 Qt 5 发行的补充