On January 23, Qt Company announced the release of Qt 5.8, with a number of innovations that are quite global in nature. Let's get to know them.
Qt Lite
One of the main themes of Qt 5.8 is to make Qt more flexible and easier to adapt to the goals of users, in particular for embedded system developers. Qt Lite is the code name for a project that aims to implement these goals.
The goal of the developers of Qt Company was to make Qt easier to customize to the needs of developers, while avoiding the use of functionality that is not required in the project. This brings significant savings in the size of the compiled Qt libraries and the application being developed.
The deployed system is a long journey, where a significant part of the system that is responsible for configuring Qt has been rewritten. This new system is cleared of what has grown over the last 15 years, and this can also lead to inconsistencies with how Qt has been configured on different platforms.
As a result, one unified system for customizing various parts of Qt has been obtained. In addition, users are given a more flexible Qt library in customization. And it also aims to lighten the burden on the developers of the Qt Company in supporting all the different ways in which Qt can be configured and used.
Using the new system will allow you to create a build of Qt that is suitable for a particular case. It will be possible to opt out of the functionality that is not required, which will save ROM and RAM when deploying the application on an embedded device. To give an idea of the resource saving capabilities, below is an image that shows Qt stack queries when running a small QML application:
As you can see, the new configuration system allows for a significant reduction in size and saves over 60% in binary size compared to Qt 5.6.
Qt Wayland Compositor
The Qt Wayland Compositor API, which was included as a technology in Qt 5.7 preview, is now fully supported in Qt 5.8. The module makes it easy to create your own Wayland Compositor.
Qt Wayland Compositor makes it easy to implement your own home screen and application manager. This enables the creation of powerful and flexible embedded systems where you have multiple applications that have their own user interfaces. Qt Wayland Compositor supports handling multiple screens in an easy and transparent way. This is possible with both QML and C++ APIs.
For more information see API documentation and examples .
Communication и Networking
Qt Serialbus is now fully implemented in Qt 5.8. This allows you to use the Qt API for communication and protocols over serial interfaces. While there are many different APIs, this version includes CAN and Modbus.
Qt Network and Web Sockets fully support TLS PSK. Qt Network now supports Diffie-Hellman and HTTP/2 custom options in QNetworkAccessManager .
Qt Bluetooth supports BTLE peripherals under macOS and iOS, and also supports BTLE hubs in WinRT.
Qt 5.8 also added a new module Qt Network Authorization as a pre-review technology and currently supports OAuth 1 and 2 authentication schemes.
Qt QML и Quick
Quite a few things have happened in Qt QML and Qt Quick. The QML engine received support for caching QML and JS binary data on disk, which reduces the startup speed and memory consumption of the engine. Only the commercial version of the Qt Quick compiler is currently supported in Qt 5.8, but these changes are planned to be added in the future for better performance and more integrated solutions.
The Qt Quick scene graph has undergone significant changes to reduce its dependency on OpenGL. This allows you to add experimental support for the Direct3D 12 backend for Qt Quick, but enable the creation of other backends based on, for example, the Vulkan Graphics API.
In addition, the graphics scene now supports partial screen updates if only a small part has been changed. This gives slightly better performance for Qt Quick 2D rendering.
Also, these changes to the graphics scene are presented as an opportunity to bring the rendering functionality of Qt Quick 2D directly into Qt Quick. This means that the Qt Quick 2D renderer no longer exists as a separate module in Qt 5.8.
Big changes have also been made under the hood for handling mouse and touch events, merging them into a new QQuickPointerEvent class. This sets the stage for future improvements in mouse and touch event handling, but does not currently affect code that uses Qt Quick.
Qt Quick Controls 2 also received several new types, such as dialog boxes, rounded buttons, and tool separators. Material and Universal styles some new effects and system theme support.
Qt Webengine
As always, the Chromium version used by Qt Webengine has been updated to version 53. One important difference is the addition of support for printing Web pages. Many small functional changes have also been added, among them a new QML API for defining custom dialogs, tooltips and context menus, and support for viewing page source code.
Qt SCXML
Qt SCXML is fully supported in Qt 5.8. The module does a trivial SCXML integration based on the state machine in Qt. This builds directly on the Qt Statemachine Framework , and extends it with both SCXML and C++ compilers and running at runtime that allows loading SCXML based on the state machine.
Along with the Qt SCXML module, Qt Creator 4.2 received support for editing state graphs.
New Technologies in Preliminary Review
Also in Qt 5.8 there is new functionality that was selected as a technology in a preliminary review.
Qt is now compiled for both Apple TV and watchOS. While much of the functionality supported on iOS should also work on tvOS, watchOS support is limited to Qt's non-graphical functionality.
Qt Speech added as a new module to support text-to-speech.
Other improvements
Since the initial release of Qt 3D with Qt 5.7, efforts have been focused on refining the module. A large number of fixes and performance improvements have been made to this module.
Qt Charts got Candlestick (Japanese Candle), and also made the QOpenGLTextureBlitter API in the public Qt Gui.
Embedded platforms have supported Qt to create devices with better multi-screen support using the eglfs QPA plugin and support for 90/180-degree screens.
Finally, many changes have been made to the core code to improve the use of functionality offered by C++11.
Источник Qt Blog