Qt 5.4 的新功能

The focus for Qt 5.4 is mainly about improving the stability, performance, and first-time user experience of the product.

新模块

新的支持平台

  • WinRT now a supported platform
  • Windows Phone 8.1 minimum supported version

Qt 5.4 中的新特征

Qt GUI 模块

  • QOpenGLContext is now able to adopt existing native contexts (EGL, GLX, and so on). This allows interoperability among Qt and other frameworks, such as game engines.
  • OpenGL ES 3.0/3.1 support is improved. The header file for the highest usable ES version (gl31.h, gl3.h or gl2.h) is now automatically included by Qt's headers in -opengl es2 builds. Vertex array objects, framebuffer blits and multisampling are now supported via the standard GLES3 functions, where applicable.
  • Selecting the dynamic OpenGL implementation on application startup is now available on Windows when configured with _ -opengl dynamic_. This allows using either opengl32.dll or ANGLE's OpenGL ES 2.0 implementation in Qt and applications without the need for two separate builds of the binaries.
  • QOpenGLWidget : The modern replacement for QGLWidget and the counterpart of QQuickWidget .
  • QOpenGLWindow : Convenience class for performing OpenGL drawing onto a QWindow .
  • QRasterWindow : Covenience class for performing software-based drawing via QPainter QWindow .
  • Support for 10-bit per color channels images. These can be rendered to and from, though internally the raster engine will still use 8-bit per color channel. If used as the internal format of a QOpenGLFramebufferObject , the OpenGL paint engine is able to render in full precision if supported by the OpenGL driver.
  • WinRT : Added support for native file dialogs.

Qt Core 模块

  • WinRT : Added support for native settings container (local and roaming).
  • QStorageInfo : Class for providing information about currently mounted storage volumes and drives.
  • QByteArrayList : Convenience class adding similar extra methods on top of QList < QByteArray > as QStringList does to QList < QString >.
  • QTabletEvent : several improvements to the input information: added information about the stylus buttons being pressed, the rotation and tangential pressures now have consistent ranges across platforms, the proximity events now include the type of stylus or other tool in use, and manual tests and debug output are improved for better verification of functionality.

Qt Widgets 模块

  • Improved scaling of widget styles based on DPI.

Qt Quick 模块

  • QQuickRenderControl is made public. This API allows efficient rendering of Qt Quick 2 scenes into framebuffer objects. The contents can then be used in arbitrary ways in Qt-based or 3rd party OpenGL renderers.
  • Introduced overlay and pull back headers and footers for ListView .
  • Added QQuickFontMetrics, which provides a subset of QFontMetricsF 's API.
  • Added QQuickTextMetrics, which provides a declarative API for the QFontMetricsF function arguments.
  • QQuickWidget is now supported on Android.

Qt Quick Controls 模块

Qt Bluetooth 模块

  • Support for Bluez5.
  • Tech Preview of Bluetooth Low Energy (client side support only, on Bluez 4 & 5).

QPA 插件

  • The Wayland platform plugin is now part of the release.
  • XCB will now support screen with a depth of 30 (10 bit per color channel).
  • More font settings are parsed by fontconfig and GTK platform backends.
  • More categorized logging is in use so that you can enable it in the standard ways (qtlogging.ini etc.) instead of needing to set obscure environment variables or uncomment #defines. The log also provides more complete information, especially about events.
  • Support for integer device pixel ratios larger than one has been added to the XCB plugin. The ratio is controlled by the environment variable QT_DEVICE_PIXEL_RATIO .

Qt WebKit 模块

  • Added support for OpenGL accelerated 2D canvas to Qt WebKit Widgets .
  • Qt WebKit module is considered done . It will be replaced by Qt WebEngine. This applies to the widgets as well as to the QML API of Qt WebKit .

Qt Windows Extras 模块

  • Multiple thumbnail images when hovering over an application's taskbar.

Qt Sensors 模块

  • Windows Phone: Added compass and ambient light sensors.

Qt SQL 模块

  • Windows Phone: Added support for sqlite.

弃用特征

Qt OpenGL 模块

  • The Qt OpenGL module (which contain classes that start with QGL ) is now deprecated in favor of the Qt GUI 模块 (包含类开头采用 QOpenGL ). QGLWidget can now be replaced by QOpenGLWidget .

API 变化列表

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

其它 Qt 5 发行的补充