New Classes and Functions in Qt 5.12 | Qt 5.12 5.12.4

Qt 5.12 | New Classes and Functions in Qt 5.12

Qt 5.12.4 Reference Documentation

# New Classes and Functions in Qt 5.12

This page contains a comprehensive list of all new classes and functions introduced in Qt 5.12. Links to new APIs in previous Qt 5 releases are found at the bottom of this page.

- New Classes
- New Member Functions
- New Functions in Namespaces
- New Global Functions
- New Macros
- New Enum Types
- New Typedefs
- New Properties
- New QML Types
- New QML Properties
- New QML Signals
- New QML Methods

### New Classes

C
  QCborArray
  ConstIterator (QCborArray)
  QCborError
  QCborMap
  ConstIterator (QCborMap)
  QCborParserError
  QCborStreamReader
  QCborStreamWriter
  QCborValue

D
  QDtls
  QDtlsClientVerifier

G
  GeneratorParameters (QDtlsClientVerifier)
  QGeoRouteLeg

I
  Iterator (QCborArray)
  Iterator (QCborMap)

S
  QScopeGuard

W
  QWaylandXdgDecorationManagerV1
  QWaylandXdgPopup
  QWaylandXdgShell
  QWaylandXdgSurface
  QWaylandXdgToplevel
  QWebEngineUrlScheme

### New Member Functions

Class QBluetoothDeviceInfo:

| manufacturerData(quint16 manufacturerId) const
| manufacturerData() const
| manufacturerIds() const
| setManufacturerData(quint16 manufacturerId, const QByteArray &data)

Class QMetaEnum:

| enumName() const

Class QSortFilterProxyModel:

| setFilterRegularExpression(const QString &pattern)

Class QTimer:

| callOnTimeout(Functor slot, Qt::ConnectionType connectionType)
| callOnTimeout(const QObject *context, Functor slot, Qt::ConnectionType connectionType)
| callOnTimeout(const QObject *receiver, PointerToMemberFunction slot, Qt::ConnectionType connectionType)

Class QByteArray:

| compare(const QByteArray &a, Qt::CaseSensitivity cs) const
| compare(const char *c, Qt::CaseSensitivity cs) const
| isLower() const
| isUpper() const

Class QTextStream:

| operator<<(QStringView string)

Class QCryptographicHash:

| hashLength(QCryptographicHash::Algorithm method)

Class QExplicitlySharedDataPointer:

| take()

Class QRegularExpression:

| anchoredPattern(const QString &expression)
| wildcardToRegularExpression(const QString &pattern)

Class QString:

| compare(QStringView s, Qt::CaseSensitivity cs) const
| isLower() const
| isUpper() const

Class QStringList:

| contains(QStringView str, Qt::CaseSensitivity cs) const

Class QStringView:

| compare(QStringView other, Qt::CaseSensitivity cs) const

Class QMetaEnumBuilder:

| enumName() const
| setEnumName(const QByteArray &alias)

Class QDBusMessage:

| isInteractiveAuthorizationAllowed() const
| setInteractiveAuthorizationAllowed(bool enable)

Class QBitmap:

| fromImage(QImage &&image, Qt::ImageConversionFlags flags)

Class QIcon:

| fallbackThemeName()
| setFallbackThemeName(const QString &name)

Class QImageReader:

| imageFormatsForMimeType(const QByteArray &mimeType)

Class QImageWriter:

| imageFormatsForMimeType(const QByteArray &mimeType)

Class QPainter:

| fillRect(const QRect &rectangle, QGradient::Preset preset)
| fillRect(const QRectF &rectangle, QGradient::Preset preset)
| fillRect(int x, int y, int width, int height, QGradient::Preset preset)

Class QPalette:

| placeholderText() const

Class QStandardItem:

| clearData()

Class QStandardItemModel:

| clearItemData(const QModelIndex &index)

Class QTextBlockFormat:

| headingLevel() const
| setHeadingLevel(int level)

Class QTextImageFormat:

| quality() const
| setQuality(int quality)

Class QWindowSystemInterface:

| setPlatformFiltersEvents(bool enable)

Class QGeoRoute:

| routeLegs() const
| setRouteLegs(const QList<QGeoRouteLeg> &legs)

Class QGeoRouteSegment:

| isLegLastSegment() const

Class QGeoServiceProviderFactoryV3:

virtual | setQmlEngine(QQmlEngine *engine)

Class QSslCertificate:

| issuerDisplayName() const
| subjectDisplayName() const

Class QNearFieldManager:

| adapterStateChanged(QNearFieldManager::AdapterState state)
| isSupported() const

Class QNearFieldTarget:

| reportError(QNearFieldTarget::Error error, const QNearFieldTarget::RequestId &id)

Class QGeoPath:

| clearPath()

Class QGeoPolygon:

| addHole(const QList<QGeoCoordinate> &holePath)
| addHole(const QVariant &holePath)
| hole(int index) const
| holePath(int index) const
| holesCount() const
| removeHole(int index)

Class QJSValue:

| errorType() const

Class QJSEngine:

| importModule(const QString &fileName)
| newErrorObject(QJSValue::ErrorType errorType, const QString &message)

Class QQmlComponent:

| engine() const

Class QQmlEngine:

| singletonInstance(int qmlTypeId)

Class QQuickStyle:

| addStylePath(const QString &path)
| stylePathList()

Class QCanBusDevice:

| clear(QCanBusDevice::Directions direction)
| readAllFrames()

Class QWebSocket:

| bytesToWrite() const

Class QWebSocketServer:

| nativeDescriptor() const
| setNativeDescriptor(qintptr socketDescriptor)

Class QDoubleSpinBox:

| setStepType(QAbstractSpinBox::StepType stepType)

Class QLayout:

| indexOf(QLayoutItem *layoutItem) const

Class QLineEdit:

| inputRejected()

Class QSpinBox:

| setStepType(QAbstractSpinBox::StepType stepType)

Class QWaylandCompositor:

| addSocketDescriptor(int fd)

Class QWaylandSeat:

| sendKeyEvent(int qtKey, bool pressed)

Class QRemoteObjectHostBase:

| addHostSideConnection(QIODevice *ioDevice)

Class QRemoteObjectNode:

| addClientSideConnection(QIODevice *ioDevice)
| registerExternalSchema(const QString &schema, QRemoteObjectNode::RemoteObjectSchemaHandler handler)

### New Functions in Namespaces

| deriveKeyPbkdf1(QCryptographicHash::Algorithm algorithm, const QByteArray &data, const QByteArray &salt, int iterations, quint64 dkLen)
| deriveKeyPbkdf2(QCryptographicHash::Algorithm algorithm, const QByteArray &data, const QByteArray &salt, int iterations, quint64 dkLen)
| imageFromHBITMAP(HBITMAP bitmap, QtWin::HBitmapFormat format)
| imageToHBITMAP(const QImage &image, QtWin::HBitmapFormat format)
| toString(const std::tuple<Types...> &tuple)
| toString(const QCborError &c)

### New Global Functions

| qFromBigEndian(const void *src, qsizetype count, void *dest)
| qFromLittleEndian(const void *src, qsizetype count, void *dest)
| qToBigEndian(const void *src, qsizetype count, void *dest)
| qToLittleEndian(const void *src, qsizetype count, void *dest)
| qmlTypeId(const char *uri, int versionMajor, int versionMinor, const char *qmlName)

### New Macros

| QT_TRANSLATE_N_NOOP(context, sourceText)
| QT_TRANSLATE_N_NOOP3(context, sourceText, comment)
| QT_TR_N_NOOP(sourceText)

### New Enum Types

enum | Field { None, RSSI, ManufacturerData, All }
enum | Direction { Input, Output, AllDirections }
enum | HandshakeState { HandshakeNotStarted, HandshakeInProgress, PeerVerificationFailed, HandshakeComplete }
enum | QDtlsError { NoError, InvalidInputParameters, InvalidOperation, UnderlyingSocketError, ..., TlsNonFatalError }
enum | Preset { WarmFlame, NightFade, SpringWarmth, JuicyPeach, ..., PerfectBlue }
enum | ErrorType { NoError, GenericError, EvalError, RangeError, ..., URIError }
enum | AdapterState { Offline, TurningOn, Online, TurningOff }

### New Typedefs

typedef | RemoteObjectSchemaHandler

### New Properties

- focusOnTouch : const
- itemAlignment : const
- filterRegularExpression : const
- canRedo : const
- canUndo : const
- clean : const

- redoText : const
- undoText : const
- tickAnchor : const
- tickInterval : const
- tickType : const

### New QML Types

W
  WavefrontMesh

X
  XdgDecorationManagerV1
  XdgPopup
  XdgShell
  XdgSurface
  XdgToplevel

### New QML Properties

| defaultLogLevel
| orientation
| sortCaseSensitive
| synchronousDrag
| visibleArea

### New QML Signals

| finished()
| finished()

### New QML Methods

| coordToMercator()
| mercatorToCoord()
| polygon()
| equals()
| addSocketDescriptor()
| sendKeyEvent()
| action()

## 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