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

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 QByteArray:

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

Class QCryptographicHash:

hashLength(QCryptographicHash::Algorithm method)

Class QExplicitlySharedDataPointer:

take()

Class QMetaEnumBuilder:

enumName() const
setEnumName(const QByteArray &alias)

Class QRegularExpression:

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

Class QString:

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

Class QTextStream:

operator<<(QStringView string)

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 QStringList:

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

Class QStringView:

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

Class QDBusMessage:


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 QPalette:

placeholderText() const

Class QStandardItemModel:

clearItemData(const QModelIndex &index)

Class QStandardItem:


Class QWindowSystemInterface:


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 QTextBlockFormat:

headingLevel() const
setHeadingLevel(int level)

Class QTextImageFormat:

quality() const
setQuality(int quality)

Class QGeoRoute:

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

Class QGeoRouteSegment:


Class QGeoServiceProviderFactoryV3:

virtual setQmlEngine(QQmlEngine *engine)

Class QSslCertificate:


Class QNearFieldManager:

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

Class QNearFieldTarget:

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

Class QGeoPath:


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 QJSEngine:

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

Class QJSValue:

errorType() const

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:


Class QSpinBox:

setStepType(QAbstractSpinBox::StepType stepType)

Class QWaylandCompositor:


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

New Properties

New QML Types

New QML Properties

New QML Signals

New QML Methods

Additions to Other Qt 5 Releases

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.