New Features in Qt 6.1

From Qt Wiki
Revision as of 12:57, 15 February 2021 by Nezticle (talk | contribs)
Jump to navigation Jump to search


Overview of the changes

Key changes in Qt 6.1 include:

New Features (within existing modules)

QtCore

  • QFuture has new convenience functions to create futures in various states; and can now invoke its continuation in a context object's thread.
  • qfloat16 can be constructed uninitialized
  • <QMath> provides qHypot(), generalising std::hypot() to arbitrarily-many arguments and supporting qfloat16 arguments.
  • Overflow-safe arithmetic is now supported by functions qAddOverflow(), qSubOverflow(), qMulOverflow()
  • removeIf() methods and erase_if() support are extended to more classes
    • QHash, QMap and their Multi variants, whose predicates take either a std::pair or the container's own iterator.
    • QSet, which also gains an insert() overload that takes (but, for now, ignores) a location hint, for compatibility with stl.
    • QString, QByteArray and QList, which also gain erase() support to remove all instances of a specified value
    • QVarLengthArray, along with erase() support and methods removeAll() and removeOne()
  • QStringView's API now includes count(), contains(), indexOf(), lastIndexOf(), constBegin(), constEnd()
  • QLocale provides mappings from its enums to ISO codes and back: languageToCode(), scriptToCode(), countryToCode(), codeToLanguage(), codeToScript(), codeToCountry()
  • QSocketNotifier now supports more flexible creation
  • Added QOperatingSystemVersion::version(), QMetaType::hasRegisteredDataStreamOperators(), QUntypedBindble::isReadOnly() whose names hopefully say enough.
  • Added QJniObject and QJniEnvironment as public API (mainly used for Android).
  • Object property bindings

QtNetwork

  • QNetworkCookie now supports the SameSite feature
  • Support for SSL plugins added (private API for now)
  • Introduced QNetworkInformation
    • QNetworkInformation currently exposes the reachability of the system, using system API.
    • Currently supports Darwin, Windows, Android, and NetworkManager on Linux.

QtQuick3D

  • Instanced Rendering (TP)
  • 3D Particles (TP)
  • Morph Animations

New Modules

Platform Changes

All

Linux

macOS

Windows

Android

Removed Modules

Additional Modules Available via Package Manager

The following additional modules are available via the package manager functionality in the Qt online installer:

  • Qt Charts
    • Qt Charts still supports only OpenGL for accelerated series (AbstractSeries.useOpenGL). Such series will not render in Qt Quick if another graphics API is used for rendering.
  • Qt Data Visualization
    • Qt Data Visualization supports only OpenGL RHI backend, and requires setting of the environment variable QSG_RHI_BACKEND to opengl. This can either be done on system level, or defined in the application main with qputenv("QSG_RHI_BACKEND", "opengl");
  • Qt State Machines
    • The newly available Qt State Machines package will contain both the Qt SCXML module and the Qt StateMachine module.
  • Active Qt
    • Qt's ActiveX and COM support allows Qt for Windows developers to:
      • Access and use ActiveX controls and COM objects provided by any ActiveX server in their Qt applications.
      • Make their Qt applications available as COM servers, with any number of Qt objects and widgets as COM objects and ActiveX controls.
  • Qt Lottie
    • The Qt Lottie module has been ported to Qt 6 and the CMake build system
  • Qt Virtual Keyboard
    • The Qt Virtual Keyboard module has been ported to Qt 6 and the CMake build system


The package manager provides these additional modules as source packages, which need to be built locally by the user.