New Classes and Functions in Qt 5.8

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

New Namespaces

New Classes

A
QAbstractOAuth
QAbstractOAuth2
QAbstractOAuthReplyHandler
AssignmentInfo (QScxmlExecutableContent)
QAxisAccumulator (Qt3DInput)
C
QCanBus
QCanBusDevice
QCanBusFactory
QCanBusFrame
QCandlestickLegendMarker
QCandlestickModelMapper
QCandlestickSeries
QCandlestickSet
D
QDeadlineTimer
E
EvaluatorInfo (QScxmlExecutableContent)
F
Filter (QCanBusDevice)
ForeachLoopBody (QScxmlDataModel)
ForeachInfo (QScxmlExecutableContent)
H
QHCandlestickModelMapper
I
InvokeInfo (QScxmlExecutableContent)
L
Loader (QScxmlCompiler)
M
QModbusClient
QModbusDataUnit
QModbusDevice
QModbusDeviceIdentification
QModbusExceptionResponse
QModbusPdu
QModbusReply
QModbusRequest
QModbusResponse
QModbusRtuSerialSlave
QModbusServer
QModbusTcpClient
QModbusTcpServer
N
QNetworkDatagram
O
QOpenGLTextureBlitter
P
QPointingDeviceUniqueId
ParameterInfo (QScxmlExecutableContent)
R
QRenderCapture (Qt3DRender)
QRenderCaptureReply (Qt3DRender)
S
QSGImageNode
QSGRectangleNode
QSGRenderNode
QSGRendererInterface
QSctpServer
QSctpSocket
QScxmlDynamicScxmlServiceFactory
QScxmlInvokableService
QScxmlInvokableServiceFactory
QScxmlStaticScxmlServiceFactory
QScxmlTableData
QSslDiffieHellmanParameters
T
TimeStamp (QCanBusFrame)
V
QVCandlestickModelMapper
W
QWaylandBufferRef
QWaylandClient
QWaylandCompositor
QWaylandIviSurface
QWaylandKeyboard
QWaylandOutput
QWaylandOutputMode
QWaylandPointer
QWaylandQuickItem
QWaylandQuickShellSurfaceItem
QWaylandSeat
QWaylandSurface
QWaylandSurfaceGrabber
QWaylandTouch
QWaylandView
QWaylandWlShell
QWaylandWlShellSurface
QWaylandXdgPopupV5
QWaylandXdgSurfaceV5

New Member Functions

Class QLine:

QPoint center() const

Class QLibraryInfo:

QVersionNumber version()

Class QMetaEnum:

bool isScoped() const

Class QTimer:

std::chrono::milliseconds intervalAsDuration() const
std::chrono::milliseconds remainingTimeAsDuration() const
void singleShot(std::chrono::milliseconds msec, const QObject *receiver, const char *member)
void singleShot(std::chrono::milliseconds msec, Qt::TimerType timerType, const QObject *receiver, const char *member)
void start(std::chrono::milliseconds msec)

Class QMutex:

bool try_lock()
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
bool try_lock_until(std::chrono::time_point<Clock, Duration> timePoint)

Class QWaitCondition:

void notify_all()
void notify_one()

Class QLatin1String:

QLatin1Char at(int pos) const
QLatin1String left(int length) const
QLatin1String mid(int start) const
QLatin1String mid(int start, int length) const
QLatin1Char operator[](int pos) const
QLatin1String right(int length) const

Class QCommandLineOption:

Flags flags() const
void setFlags(Flags flags)

Class QDateTime:

qint64 currentSecsSinceEpoch()
QDateTime fromSecsSinceEpoch(qint64 secs, Qt::TimeSpec spec = Qt::LocalTime, int offsetSeconds = 0)
QDateTime fromSecsSinceEpoch(qint64 secs, const QTimeZone &timeZone)
void setSecsSinceEpoch(qint64 secs)
qint64 toSecsSinceEpoch() const

Class QLineF:

QPointF center() const

Class QRect:

CGRect toCGRect() const

Class QPoint:

CGPoint toCGPoint() const

Class QPointF:

QPointF fromCGPoint(CGPoint point)
CGPoint toCGPoint() const

Class QRectF:

QRectF fromCGRect(CGRect rect)
CGRect toCGRect() const

Class QSize:

CGSize toCGSize() const

Class QSizeF:

QSizeF fromCGSize(CGSize size)
CGSize toCGSize() const

Class QStringList:

QString join(QLatin1String separator) const

Class QStringRef:

void chop(int n)
int compare(const QByteArray &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const

Class TouchPoint:

qreal rotation() const
QPointingDeviceUniqueId uniqueId() const

Class QOpenGLContext:

QFunctionPointer getProcAddress(const char *procName) const

Class QPlatformTheme:

virtual QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions = 0) const

Class QColor:

bool isValidColor(QLatin1String name)
void setNamedColor(QLatin1String name)

Class QRegion:

const_iterator begin() const
const_iterator cbegin() const
const_iterator cend() const
const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
const_iterator end() const
const_reverse_iterator rbegin() const
const_reverse_iterator rend() const

Class QAbstractTextDocumentLayout:

QTextFormat formatAt(const QPointF &pos) const
QString imageAt(const QPointF &pos) const

Class QFontMetrics:

int capHeight() const

Class QFontMetricsF:

qreal capHeight() const

Class QRawFont:

qreal capHeight() const

Class QNetworkAccessManager:

QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, const QByteArray &data)
QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QHttpMultiPart *multiPart)

Class QHostAddress:

bool isEqual(const QHostAddress &other, ConversionMode mode = TolerantConversion) const
QHostAddress &operator=(SpecialAddress address)
void setAddress(SpecialAddress address)

Class QNetworkProxyFactory:


Class QSslConfiguration:

QSslDiffieHellmanParameters diffieHellmanParameters() const
QByteArray preSharedKeyIdentityHint() const
void setDiffieHellmanParameters(const QSslDiffieHellmanParameters &dhparams)
void setPreSharedKeyIdentityHint(const QByteArray &hint)

Class QFormLayout:

void removeRow(int row)
void removeRow(QWidget *widget)
void removeRow(QLayout *layout)
TakeRowResult takeRow(int row)
TakeRowResult takeRow(QWidget *widget)
TakeRowResult takeRow(QLayout *layout)

Class QUndoStack:

void resetClean()

Class QMainWindow:

void tabifiedDockWidgetActivated(QDockWidget *dockWidget)

Class QBluetoothDeviceDiscoveryAgent:

int lowEnergyDiscoveryTimeout() const
void setLowEnergyDiscoveryTimeout(int timeout)
void start(DiscoveryMethods methods)
DiscoveryMethods supportedDiscoveryMethods()

Class QLowEnergyController:

QBluetoothUuid remoteDeviceUuid() const

Class QJSValue:

bool isQMetaObject() const
const QMetaObject *toQMetaObject() const

Class QJSEngine:

QJSValue newQMetaObject(const QMetaObject *metaObject)
QJSValue newQMetaObject()

Class QQmlEngine:

void exit(int retCode)

Class QQuickWindow:

QSGImageNode *createImageNode() const
QSGNinePatchNode *createNinePatchNode() const
QSGRectangleNode *createRectangleNode() const
QSGRendererInterface *rendererInterface() const
void setSceneGraphBackend(QSGRendererInterface::GraphicsApi api)
void setSceneGraphBackend(const QString &backend)

Class QSGEngine:

QSGImageNode *createImageNode() const
QSGNinePatchNode *createNinePatchNode() const
QSGRectangleNode *createRectangleNode() const
QSGRendererInterface *rendererInterface() const

Class QQuickStyle:

void setFallbackStyle(const QString &style)

Class QSerialPort:

void errorOccurred(QSerialPort::SerialPortError error)

Class QQuickWebEngineProfile:

QStringList spellCheckLanguages() const

Class QWebEngineContextMenuData:

QString misspelledWord() const
QStringList spellCheckerSuggestions() const

Class QWebEngineDownloadItem:

DownloadType type() const

Class QWebEngineProfile:

bool isSpellCheckEnabled() const
void setSpellCheckEnabled(bool enable)
void setSpellCheckLanguages(const QStringList &languages)
QStringList spellCheckLanguages() const

Class QWebEnginePage:

void print(QPrinter *printer, FunctorOrLambda resultCallback)
void replaceMisspelledWord(const QString &replacement)
void save(const QString &filePath, QWebEngineDownloadItem::SavePageFormat format = QWebEngineDownloadItem::MimeHtmlSaveFormat) const

Class QWebSocket:

void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator)

Class QWebSocketServer:

void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator)

New Functions in Namespaces

QAndroidJniObject androidContext()
qreal convertVolume(qreal volume, VolumeScale from, VolumeScale to)
QTouchDevice *createTouchDevice(QTouchDevice::DeviceType devType = QTouchDevice::TouchScreen)
char *toString(std::nullptr_t)

New Global Functions

bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
bool operator!=(std::nullptr_t, const QWeakPointer<T> &rhs)
bool operator!=(const QWeakPointer<T> &lhs, std::nullptr_t)
bool operator!=(std::nullptr_t, const QSharedPointer<T> &rhs)
bool operator!=(const QSharedPointer<T> &lhs, std::nullptr_t)
bool operator!=(std::nullptr_t, const QScopedPointer<T, Cleanup> &rhs)
bool operator!=(const QScopedPointer<T, Cleanup> &lhs, std::nullptr_t)
QDebug operator<<(QDebug debug, const QSslDiffieHellmanParameters &dhparam)
bool operator==(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs)
bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
bool operator==(std::nullptr_t, const QWeakPointer<T> &rhs)
bool operator==(const QWeakPointer<T> &lhs, std::nullptr_t)
bool operator==(std::nullptr_t, const QSharedPointer<T> &rhs)
bool operator==(const QSharedPointer<T> &lhs, std::nullptr_t)
bool operator==(std::nullptr_t, const QScopedPointer<T, Cleanup> &rhs)
bool operator==(const QScopedPointer<T, Cleanup> &lhs, std::nullptr_t)
uint qHash(const QSslDiffieHellmanParameters &dhparam, uint seed = 0)
uint qHash(const QRawFont &font, uint seed = 0)
uint qHash(QPointingDeviceUniqueId key, uint seed = 0)
uint qHash(const QMultiHash<Key, T> &key, uint seed = 0)
uint qHash(const QHash<Key, T> &key, uint seed = 0)
int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString &reason)

New Macros

QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
Q_ENUM_NS(...)
void Q_FALLTHROUGH()
Q_FLAG_NS(...)
Q_NAMESPACE

New Enum Types

enum VolumeScale { LinearVolumeScale, CubicVolumeScale, LogarithmicVolumeScale, DecibelVolumeScale }
enum DiscoveryMethod { NoMethod, ClassicMethod, LowEnergyMethod }
enum ConversionModeFlag { StrictConversion, ConvertV4MappedToIPv4, ConvertV4CompatToIPv4, ConvertLocalHost, ConvertUnspecifiedAddress, TolerantConversion }
enum LegendMarkerType { LegendMarkerTypeArea, LegendMarkerTypeBar, LegendMarkerTypePie, LegendMarkerTypeXY, LegendMarkerTypeBoxPlot, LegendMarkerTypeCandlestick }
enum DownloadType { Attachment, DownloadAttribute, UserRequested, SavePage }

New Typedefs

New Properties

New QML Types

New QML Properties

New QML Signals

binaryMessageReceived(QString message)

New QML Methods

callLater(function, argument1, argument2, ...)
callLater(function)
real convertVolume(real volume, VolumeScale from, VolumeScale to)
tryVerify(function, timeout = 5000, message = "")
void sendBinaryMessage(ArrayBuffer message)

Additions to Other Qt 5 Releases

© 2017 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.