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

enumName() const

Class QRegularExpression:

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

Class QTextStream:

operator<<(QStringView string)

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

setFilterRegularExpression(const QString &pattern)

Class QDBusMessage:


Class QIcon:

fallbackThemeName()
setFallbackThemeName(const QString &name)

Class QWindowSystemInterface:


Class QBitmap:

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

Class QImageReader:

imageFormatsForMimeType(const QByteArray &mimeType)

Class QImageWriter:

imageFormatsForMimeType(const QByteArray &mimeType)

Class QStandardItem:


Class QStandardItemModel:

clearItemData(const QModelIndex &index)

Class QGeoRoute:

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

Class QGeoRouteSegment:


Class QGeoServiceProviderFactoryV3:

virtual setQmlEngine(QQmlEngine *engine)

Class QSslCertificate:


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

errorType() const

Class QJSEngine:

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

Class QQmlComponent:

engine() const

Class QCanBusDevice:

clear(QCanBusDevice::Directions direction)
readAllFrames()

Class QDoubleSpinBox:

setStepType(QAbstractSpinBox::StepType stepType)

Class QLayout:

indexOf(QLayoutItem *layoutItem) const

Class QSpinBox:

setStepType(QAbstractSpinBox::StepType stepType)

Class QWaylandCompositor:


Class QWaylandSeat:

sendKeyEvent(int qtKey, bool pressed)

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)

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

New Properties

New QML Types

New QML Properties

New QML Signals

New QML Methods

Additions to Other Qt 5 Releases