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

setFilterRegularExpression(const QString &pattern)

Class QMetaEnum:

enumName() const

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 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, MemberFunction *slot, Qt::ConnectionType connectionType)

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:


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

page() const

Class QWebEnginePage:

printRequested()
selectClientCertificate(QWebEngineClientCertificateSelection clientCertificateSelection)

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)

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

New QML Types

New QML Properties

New QML Signals

New QML Methods

Additions to Other Qt 5 Releases