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

bool isGammaCorrectEnabled() const
void setGammaCorrectEnabled(bool enabled)

Class QRenderCaptureReply:

bool saveImage(const QString &fileName) const

Class QDataStream:

QDataStream &operator<<(qfloat16 f)
QDataStream &operator>>(qfloat16 &f)

Class QAbstractFileEngine:

virtual QByteArray id() const

Class QDir:

bool isEmpty(Filters filters = Filters( AllEntries | NoDotAndDotDot )) const

Class QStorageInfo:

QByteArray subvolume() const

Class QTemporaryDir:

QString filePath(const QString &fileName) const

Class QObject:

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

Class QThreadPool:

bool tryTake(QRunnable *runnable)

Class QByteArray:

QByteArray toHex(char separator) const

Class QStringRef:

const_iterator constBegin() const
const_iterator constEnd() const
bool isRightToLeft() const

Class QTimeZone:

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

Class QVarLengthArray:

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

Class QIconEngine:

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

Class QImage:

bool reinterpretAsFormat(Format format)

Class TouchPoint:

QSizeF ellipseDiameters() const

Class QOffscreenSurface:

void *nativeHandle() const
void setNativeHandle(void *handle)

Class QPlatformScreen:

virtual int currentMode() const
virtual QString manufacturer() const
virtual QString model() const
virtual QVector<Mode> modes() const
virtual int preferredMode() const
virtual QString serialNumber() const

Class QPlatformTheme:

virtual QKeySequence standardButtonShortcut(int button) const

Class QWindow:

QWindow *parent(AncestorMode mode) const
void setFlag(Qt::WindowType flag, bool on = true)

Class QOpenGLTexture:

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

Class QOpenGLShaderProgram:

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

Class QTextDocument:

QString toRawText() const

Class QWindowsWindowFunctions:

bool isTabletMode()
const QByteArray isTabletModeIdentifier()

Class QNetworkAccessManager:

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

Class QNetworkReply:

Class QNetworkConfiguration:

int connectTimeout() const
bool setConnectTimeout(int timeout)

Class QHostInfo:

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

Class QFileDialog:

QString selectedMimeTypeFilter() const

Class QSizePolicy:

QSizePolicy transposed() const

Class QWidget:

void setWindowFlag(Qt::WindowType flag, bool on = true)

Class QSystemTrayIcon:

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

Class QUndoCommand:

bool isObsolete() const
void setObsolete(bool obsolete)

Class QSplitter:

QWidget *replaceWidget(int index, QWidget *widget)

Class QNearFieldTarget:

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

Class QQmlEngine:

QString offlineStorageDatabaseFilePath(const QString &databaseName) const

Class QQmlError:

QtMsgType messageType() const
void setMessageType(QtMsgType messageType)

Class QQuickWindow:

QString sceneGraphBackend()

Class QSGTexture:

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

Class QGeoRectangle:

void extendRectangle(const QGeoCoordinate &coordinate)

Class QGeoShape:

QGeoRectangle boundingGeoRectangle() const

Class QGeoCircle:

void extendCircle(const QGeoCoordinate &coordinate)

Class QGeoCodeReply:

void aborted()

Class QGeoCameraCapabilities:

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

Class QGeoRouteReply:

void aborted()

Class QPlaceReply:

void aborted()

Class QQuickStyle:

QStringList availableStyles()

Class QCanBusFrame:

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

Class QCanBus:

QList<QCanBusDeviceInfo> availableDevices(const QString &plugin, QString *errorMessage = nullptr) const

Class QHelpSearchEngine:

void search(const QString &searchInput)
QString searchInput() const
int searchResultCount() const
QVector<QHelpSearchResult> searchResults(int start, int end) const

Class QHelpSearchQueryWidget:

QString searchInput() const
void setSearchInput(const QString &searchInput)

Class QWebEngineDownloadItem:

DownloadInterruptReason interruptReason() const
QString interruptReasonString() const

Class QWebEnginePage:

void load(const QWebEngineHttpRequest &request)
void pdfPrintingFinished(const QString &filePath, bool success)

Class QWebEngineView:

void load(const QWebEngineHttpRequest &request)

Class QWebSocketServer:

void handleConnection(QTcpSocket *socket) const

New Functions in Namespaces

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

New Global Functions

bool operator!=(QHostAddress::SpecialAddress lhs, const QHostAddress &rhs)
quint16 qChecksum(const char *data, uint len, Qt::ChecksumType standard)
void 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 DownloadInterruptReason { NoReason, FileFailed, FileAccessDenied, FileNoSpace, ..., UserCanceled }
enum ChecksumType { ChecksumIso3309, ChecksumItuV41 }

New Typedefs

New Properties

New Variables

const QOperatingSystemVersion AndroidJellyBean
const QOperatingSystemVersion AndroidJellyBean_MR1
const QOperatingSystemVersion AndroidJellyBean_MR2
const QOperatingSystemVersion AndroidKitKat
const QOperatingSystemVersion AndroidLollipop
const QOperatingSystemVersion AndroidLollipop_MR1
const QOperatingSystemVersion AndroidMarshmallow
const QOperatingSystemVersion AndroidNougat
const QOperatingSystemVersion AndroidNougat_MR1
const QOperatingSystemVersion MacOSSierra
const QOperatingSystemVersion OSXElCapitan
const QOperatingSystemVersion OSXMavericks
const QOperatingSystemVersion OSXYosemite
const QOperatingSystemVersion Windows10
const QOperatingSystemVersion Windows7
const QOperatingSystemVersion Windows8
const QOperatingSystemVersion Windows8_1

New QML Types

New QML Properties

New QML Signals

New QML Methods

void addMapItemGroup(MapItemGroup itemGroup)
void addMapParameter(MapParameter parameter)
void clearMapParameters()
void removeMapItemGroup(MapItemGroup itemGroup)
void removeMapParameter(MapParameter parameter)
geopath path() const
geopath shapeToPath(geoshape shape) const
bool saveImage(fileName)
object createTemporaryObject(Component component, object parent, object properties)
object createTemporaryQmlObject(string qml, object parent, string filePath)
TouchEventSequence touchEvent(object item)

Additions to Other Qt 5 Releases

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