New Classes and Functions in Qt 5.9

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

New Classes

New Member Functions

Class QAbstractFileEngine:

virtual id() const

Class QDir:

isEmpty(QDir::Filters filters) const

Class QByteArray:

toHex(char separator) const

Class QDataStream:

operator<<(qfloat16 f)
operator<<(std::nullptr_t ptr)
operator>>(qfloat16 &f)
operator>>(std::nullptr_t &ptr)

Class QObject:

startTimer(std::chrono::milliseconds time, Qt::TimerType timerType)

Class QStorageInfo:

subvolume() const

Class QStringRef:

constBegin() const
constEnd() const
isRightToLeft() const

Class QTemporaryDir:

filePath(const QString &fileName) const

Class QThreadPool:

tryTake(QRunnable *runnable)

Class QTimeZone:

fromCFTimeZone(CFTimeZoneRef timeZone)
fromNSTimeZone(const NSTimeZone *timeZone)
toCFTimeZone() const
toNSTimeZone() const

Class QVarLengthArray:

append(T &&t)
push_back(T &&t)

Class QHelpSearchEngine:

search(const QString &searchInput)
searchInput() const
searchResultCount() const
searchResults(int start, int end) const

Class QHelpSearchQueryWidget:

searchInput() const
setSearchInput(const QString &searchInput)

Class QIconEngine:

scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale)

Class QImage:

reinterpretAsFormat(QImage::Format format)

Class QOffscreenSurface:

nativeHandle() const
setNativeHandle(void *handle)

Class QOpenGLTexture:

setCompressedData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void *data, const QOpenGLPixelTransferOptions *const options)
setData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void *data, const QOpenGLPixelTransferOptions *const options)

Class QOpenGLShaderProgram:

addCacheableShaderFromSourceCode(QOpenGLShader::ShaderType type, const QByteArray &source)
addCacheableShaderFromSourceCode(QOpenGLShader::ShaderType type, const QString &source)
addCacheableShaderFromSourceCode(QOpenGLShader::ShaderType type, const char *source)
addCacheableShaderFromSourceFile(QOpenGLShader::ShaderType type, const QString &fileName)

Class TouchPoint:

Class QWindow:

parent(QWindow::AncestorMode mode) const
setFlag(Qt::WindowType flag, bool on)

Class QTextDocument:

toRawText() const

Class QPlatformScreen:

virtual currentMode() const
virtual manufacturer() const
virtual model() const
virtual modes() const
virtual preferredMode() const
virtual serialNumber() const

Class QPlatformTheme:

virtual standardButtonShortcut(int button) const

Class QGeoCameraCapabilities:

maximumFieldOfView() const
minimumFieldOfView() const
overzoomEnabled() const
setMaximumFieldOfView(double maximumFieldOfView)
setMinimumFieldOfView(double minimumFieldOfView)
setOverzoomEnabled(bool overzoomEnabled)

Class QGeoCodeReply:

Class QGeoRouteReply:

Class QPlaceReply:

Class QHostInfo:

lookupHost(const QString &name, Functor functor)
lookupHost(const QString &name, const QObject *context, Functor functor)
lookupHost(const QString &name, const QObject *receiver, PointerToMemberFunction function)

Class QNetworkAccessManager:

addStrictTransportSecurityHosts(const QVector<QHstsPolicy> &knownHosts)
isStrictTransportSecurityEnabled() const
redirectPolicy() const
setRedirectPolicy(QNetworkRequest::RedirectPolicy policy)
setStrictTransportSecurityEnabled(bool enabled)
strictTransportSecurityHosts() const

Class QNetworkConfiguration:

connectTimeout() const
setConnectTimeout(int timeout)

Class QNetworkReply:

Class QNearFieldTarget:

keepConnection() const
maxCommandLength() const
setKeepConnection(bool isPersistent)

Class QWindowsWindowFunctions:

Class QGeoCircle:

extendCircle(const QGeoCoordinate &coordinate)

Class QGeoRectangle:

extendRectangle(const QGeoCoordinate &coordinate)

Class QGeoShape:

Class QQmlEngine:

offlineStorageDatabaseFilePath(const QString &databaseName) const

Class QQmlError:

messageType() const
setMessageType(QtMsgType messageType)

Class QQuickWindow:

Class QSGTexture:

anisotropyLevel() const
setAnisotropyLevel(QSGTexture::AnisotropyLevel level)

Class QQuickStyle:

Class QCanBus:

availableDevices(const QString &plugin, QString *errorMessage) const

Class QCanBusFrame:

hasBitrateSwitch() const
hasErrorStateIndicator() const
setBitrateSwitch(bool bitrateSwitch)
setErrorStateIndicator(bool errorStateIndicator)

Class QWebSocketServer:

handleConnection(QTcpSocket *socket) const

Class QFileDialog:

Class QSizePolicy:

transposed() const

Class QSplitter:

replaceWidget(int index, QWidget *widget)

Class QSystemTrayIcon:

showMessage(const QString &title, const QString &message, const QIcon &icon, int millisecondsTimeoutHint)

Class QUndoCommand:

isObsolete() const
setObsolete(bool obsolete)

Class QWidget:

setWindowFlag(Qt::WindowType flag, bool on)

Class QSkyboxEntity:

Class QRenderCaptureReply:

saveImage(const QString &fileName) const

New Functions in Namespaces

addRow(const char *format, ...)
qmlDebug(const QObject *object)
qmlWarning(const QObject *object)

New Global Functions

operator!=(QHostAddress::SpecialAddress lhs, const QHostAddress &rhs)
qChecksum(const char *data, uint len, Qt::ChecksumType standard)
qMakeStaticByteArrayMatcher(const char (&)[N] pattern)
qmlRegisterModule(const char *uri, int versionMajor, int versionMinor)

New Enum Types

enum RedirectPolicy { ManualRedirectPolicy, NoLessSafeRedirectPolicy, SameOriginRedirectPolicy, UserVerifiedRedirectPolicy }
enum AnisotropyLevel { AnisotropyNone, Anisotropy2x, Anisotropy4x, Anisotropy8x, Anisotropy16x }
enum ChecksumType { ChecksumIso3309, ChecksumItuV41 }

New Typedefs

New Properties

New Variables

New QML Types

New QML Properties

New QML Signals

New QML Methods

Additions to Other Qt 5 Releases

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