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

enumName() const
setEnumName(const QByteArray &alias)

Class QRegularExpression:

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

Class QSortFilterProxyModel:

setFilterRegularExpression(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 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 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 QStandardItem:


Class QStandardItemModel:

clearItemData(const QModelIndex &index)

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


Class QDoubleSpinBox:

setStepType(QAbstractSpinBox::StepType stepType)

Class QLayout:

indexOf(QLayoutItem *layoutItem) const

Class QLineEdit:


Class QSpinBox:

setStepType(QAbstractSpinBox::StepType stepType)

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

New Macros

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

New Enum Types

enum HandshakeState { HandshakeNotStarted, HandshakeInProgress, PeerVerificationFailed, HandshakeComplete }
enum QDtlsError { NoError, InvalidInputParameters, InvalidOperation, UnderlyingSocketError, ..., TlsNonFatalError }
enum Preset { WarmFlame, NightFade, SpringWarmth, JuicyPeach, ..., PerfectBlue }

New Properties

Additions to Other Qt 5 Releases