- Qt 5.15
- What's New in Qt 5.12
- Qt 5.15.12 Reference Documentation

# What's New in Qt 5.12

## New Features in Qt 5.12

### Qt Core Module

- Added the static QCryptographicHash::hashLength method. It returns the length of a hash's output.
- Added wildcardToRegularExpression helper method to QRegularExpression for easier wildcard implementation in user code.
- Added anchoredPattern helper method to QRegularExpression for easier exact matching implementation in user code.
- Added QRegularExpression support to QSortFilterProxyModel.
- Support for CBOR data similar to existing JSON support.

### Qt Network Module

- Added DTLS (Datagram Transport Layer Security) over UDP support.
- Added renegotiation to Security Transport backend.
- Added ALPN support and HTTP/2 protocol negotiation to Security Transport backend.
- Added PKCS#8 support in the generic SSL backend (WinRT and Secure Transport).
- Added QPasswordDigestor: a new namespace that contains password-based key derivation functions (currently PBKDF1 and PBKDF2).

### Qt Widgets Module

- Added QStyle::SH_SpinBox_StepModifier style hint.
- Added QLineEdit::inputRejected signal.
- Added Qt::WA_StyleSheetTarget attribute.
- Added QLayout::indexOf(QLayoutItem *) function.

### Qt QML Module

- The JavaScript engine now supports ECMAScript 7. This includes an upgrade to ECMAScript 6, see ECMAScript 6 - New Features: Overview & Comparison.
- ECMAScript modules can now be loaded directly with QJSEngine::importModule() and imported in .qml files when using the .mjs file extension.

### Qt Quick Module

- Pointer Handlers are renamed to Input Handlers (we include the pre-existing Keys attached property in this category) and are now fully supported as a first-class QML feature in Qt Quick. (C++ API for them is still not public yet.)
- HoverHandler is a new type of handler for detecting mouse hover. It can detect hover even in cases of deep nesting: unlike MouseArea, you can hover multiple nested Items with HoverHandlers in them at the same time. (For example, a sidebar and an individual button on the sidebar).
- DragHandler is now a multi-point handler: if you set minimumPointCount to `2`, it will react only to a 2-finger drag, for example. This can give you another degree of freedom: single-finger drag can perform the typical item movement, and 2-finger drag can do something else (change the tilt angle, for example).
- Added support for pregenerated distance field caches for faster startup times.
- Added TableView as another type of Item View: on par with ListView but having multiple columns. Unlike the one in QtQuick Controls 1.x, it does not do any styling; rather it provides the optimal solution for instantiating (and pooling and reusing) delegates on demand as you scroll through the rows and columns.
- Tech Preview: Added DelegateChooser as a means of choosing different delegates in Item Views (such as TableView) depending on role values from the model, or depending on the index.

### Qt Quick Controls 2 Module

- Dial: Added inputMode property, that adds two new ways of interacting with the Dial: horizontally and vertically. These new input modes use a relative input system that adds changes to the dial's position to its value. This results in a dial that is less "jumpy", making it safe for operations that could be harmful if done incorrectly, like adjusting audio levels.
- Control and Popup: Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background, similarly to how paddings control the geometry of the contentItem.
- Added implicit*Width and implicit*Height properties (for example, implicitHeaderWidth, implicitContentWidth, and so on) to simplify complex implicit size bindings.
- SwipeView and DialogButtonBox: Added contentWidth and contentHeight properties.
- RangeSlider:
  - Added the valueAt() function, which enables tooltips to show up-to-date values for each handle when live is set to `false` (copied from Slider).
  - Added first.moved() and second.moved() signals, similar to Slider's moved() signal.
- Control: Unless explicitly specified, baselineOffset is now automatically updated based on the top padding of the control and the baselineOffset of the contentItem. Styles no longer need to specify the baselineOffset in QML.
- Popup: added anchors.centerIn to allow a convenient way of centering a popup.
- QQuickStyle: Added stylePathList() and addStylePath() methods for managing the list of directories where Qt Quick Controls 2 searches for available styles.
- Slider and RangeSlider: Added touchDragThreshold property for configuring the threshold to initiate the touch 'drag' of the handle of the slider. The mouse 'drag' is not affected by the property.
- TextArea and TextField: Added placeholderTextColor property to customize the placeholderText color to fit the backgrounds.
- Material: Added a Dense variant of the Material style for use on desktop platforms. Some controls are slightly smaller in height and use smaller font sizes. The variant can be enabled by setting QT_QUICK_CONTROLS_MATERIAL_VARIANT to Dense or setting `Variant=Dense` in the qtquickcontrols2.conf file.
- DialogButtonBox: Added buttonLayout property that can be used to arrange the buttons.
- Tumbler: Added positionViewAtIndex() function that calls the respective PathView/ListView function, depending on the value of wrap. This allows changing currentIndex without animations.
- Control and Popup: Added horizontalPadding and verticalPadding properties as convenient ways to set both left and right, or top and bottom paddings in one go.
- ToolTip: Added non-attached show() and hide() methods to give the same level of convenience for showing non-attached tooltips with certain parameters.

### Qt 3D Module

- Load an animation from a file containing several animations, either by name or index.
- Enable stepped animation curves.
- Fix for creation and re-parenting of QNodes in some circumstances.
- Reflect loaded texture properties for frontend texture objects.
- TextureImage no longer requires a texture as parent.
- Reduce CPU usage when not in the simulation loop.
- Enable EntityLoader to load from a Component or file.
- Support rendering using OpenGL ES 3.1.
- Performance and bug fixes in the renderer backend.

### macOS-Specific

- Added support for QSurfaceType::MetalSurface.
- Added support for QSurfaceType::VulkanSurface and QVulkanWindow, using MoltenVK.

### Qt Wayland Module

- Added support for xdg-shell stable (and deprecated unstable v5).
- Made the default window decorations look nicer.
- Added support for xdg-decoration-unstable-v1 for server-side window decorations.

### Qt Websockets Module

- Added the QWebSocket::bytesToWrite function.

### Qt Location Module

- Updated MapboxGL plugin with QNX7 support.
- Exposed add/remove transitions in MapItemView.
- Updated MapItemView to inherit from MapItemGroup so that it can nest itself. It can also be used as a delegate of itself.
- Support populating the PlaceSearchModel incrementally, as opposed to only switching pages.
- Introduced Map.visibleArea, to restrict the visible area of the map.
- Updated the MapItem's geoShape property to be R/W, with a virtual setter in the base class.
- Added support for inner holes in QGeoPolygon. These are currently honored, by MapPolygon, only with the MapboxGL plugin. Support in the built-in renderer will follow.
- Added support for Route legs.

### Qt Test Module

- Updated std::tuple errors to provide better diagnostics when used with QCompare.

### Qt Labs Platform

- Menu, MenuItem, SystemTrayIcon: deprecated iconName and iconSource in favor of icon.name and icon.source grouped properties.
- Menu, MenuItem, SystemTrayIcon: added icon.mask grouped property.

### Qt Virtual Keyboard Module

- Introduced an extension interface for the virtual keyboard. All the current input methods and some special keyboard layouts (for example, Hunspell, OpenWnn, and so on) have been moved to extensions. The extension interface allows third parties to create new input methods without having to modify or rebuild the virtual keyboard. In addition, this change makes it possible to add features and languages independently by copying the desired extensions to the system.
- Introduced a virtualkeyboard module, which can be linked against an extension plugin. This module provides the C++ API necessary for creating an input method.
- Added option to exclude all styles from the plugin at build time.
- Added support for MyScript Superimposed handwriting recognition. MyScript supports the recognition of isolated character, cursive, print and superimposed writing. In addition, it enables the recognition of letters, words or parts of words written one over the other, without any explicit separation between consecutive fragments. It targets small devices with sufficient hardware capabilities in terms of CPU power and memory.
- Added Vietnamese handwriting recognition (T9 Write).
- Added new layouts: Albanian, American English, Brazilian Portuguese, French Canadian, Indonesian, Malay, Mexican Spanish, Slovak, Slovenian, Thai, Turkish, Vietnamese, and Ukrainian.
- Added latin extra layout for Russian.
- The pinyin and tcime dictionaries are now bundled in the plugin by default.
- Added user dictionary and learning for Hunspell.

### Qt WebEngine Module

- Updated to Chromium 69.
- Added QWebEngineUrlScheme interface to configure type and security of custom URL schemes.
- WebActions are now exposed in QML.
- The view or page that triggered a download can now be read from download items.
- Support client SSL certificates, in so far as the operating system supports them.

### Qt GUI Module

- Added presets for QGradient based on https://webgradients.com/.
- Added 4xU16 RGBA64 formats to QImage, reading them from PNGs, and uploading or grabbing them from OpenGL.
- Added support to Windows UI Automation to the WinRT QPA, allowing Qt-based UWP applications to operate with accessibility and programmatic UI control tools.
- Replaced the handling of tablet/touchscreen/touchpad/mouse input with a unified implementation based on the Windows Pointer Input Messages on Windows 8 and newer. Hardware such as the screen digitizer in the MS Surface line is now supported without special drivers.

### Qt Serial Bus Module

- Added a virtual CAN bus plugin for simulation without CAN hardware.
- Added configuration options to canbusutil, for example for bitrate setting.
- Added CAN FD functionality to the PeakCAN plugin.
- Added the readAllFrames() and clear() functions to QCanBusDevice.

### Qt Bluetooth Module

- Added manufacturer data to the QBluetoothDeviceInfo objects that are emitted from the BLE discovery agent. Decoding iBeacon payloads is still up to the application.

### Qt for Automation Offering

- Qt MQTT now has full support for MQTT protocol level 5.
- Qt KNX
  - Support for KNXnet/IP Core Version 2.
  - Support for KNXnet/IP Routing Version 1.
  - Support for KNXnet/IP Tunneling Version 2.
  - Support for KNXnet/IP communication via TCP.
  - Tech Preview: Basic support for KNXnet/IP Secure Protocol.
- Qt OPC UA (Tech Preview)
  - Support for events.
  - Added a batch read API.
  - Added a batch write API.
  - Added a TranslateBrowsePathsToNodeIds API.
  - Improved browse API.
  - Support for the Argument and ExpandedNodeId types.
  - Nodes can now be instantiated from an ExpandedNodeId.
  - Support for multi-dimensional arrays has been fixed.
  - Support reading and writing of extension objects.

## New Modules

- Qt Remote Objects is now fully supported.
- Qt WebGL Streaming Plugin is now fully supported.

## Platform Changes

- QTimeZone
  - Now uses ICU, when available, in preference to Microsoft's native APIs.

## Technology Preview Features

- Qt for WebAssembly (TP2) - A platform target to compile Qt applications for the web browsers using WebAssembly.

## Deprecated Modules

The following modules are part of the Qt 5.12 release, but are deprecated and considered for removal in subsequent releases of Qt:

- Qt Script
- Qt Quick Controls 1
- Qt Canvas 3D

## List of API Changes

The pages below contain a list of API changes in Qt 5.12:

- New Classes and Functions in Qt 5.12
- Obsolete Classes

## Additions to Other Qt 5 Releases

- What's New in Qt 5.11
- What's New in Qt 5.10
- What's New in Qt 5.9
- What's New in Qt 5.8
- What's New in Qt 5.7
- What's New in Qt 5.6
- What's New in Qt 5.5
- What's New in Qt 5.4
- What's New in Qt 5.3
- What's New in Qt 5.2
- What's New in Qt 5.1
- What's New in Qt 5.0