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

virtual QByteArray id() const

Class QByteArray:

quint16 qChecksum(const char *data, uint len, Qt::ChecksumType standard)
QByteArray toHex(char separator) const

Class QDataStream:

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

Class QDir:

bool isEmpty(QDir::Filters filters) const

Class QObject:

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

Class QStaticByteArrayMatcher:

QStaticByteArrayMatcher<N> qMakeStaticByteArrayMatcher(const char (&)[N] pattern)

Class QStorageInfo:

QByteArray subvolume() const

Class QStringRef:

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

Class QTemporaryDir:

QString filePath(const QString &fileName) const

Class QThreadPool:

bool tryTake(QRunnable *runnable)

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(QImage::Format format)

Class QOffscreenSurface:

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

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

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

Class QPlatformScreen:

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

Class QPlatformTheme:

virtual QKeySequence standardButtonShortcut(int button) const

Class QTextDocument:

QString toRawText() const

Class TouchPoint:

QSizeF ellipseDiameters() const

Class QWindow:

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

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

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

Class QGeoCodeReply:

void aborted()

Class QGeoRouteReply:

void aborted()

Class QPlaceReply:

void aborted()

Class QHostInfo:

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

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

int connectTimeout() const
bool setConnectTimeout(int timeout)

Class QNetworkReply:


Class QNearFieldTarget:

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

Class QWindowsWindowFunctions:


Class QGeoCircle:

void extendCircle(const QGeoCoordinate &coordinate)

Class QGeoRectangle:

void extendRectangle(const QGeoCoordinate &coordinate)

Class QGeoShape:

QGeoRectangle boundingGeoRectangle() const

Class QQmlEngine:

QString offlineStorageDatabaseFilePath(const QString &databaseName) const
void qmlRegisterModule(const char *uri, int versionMajor, int versionMinor)

Class QQmlError:

QtMsgType messageType() const
void setMessageType(QtMsgType messageType)

Class QQuickWindow:

QString sceneGraphBackend()

Class QSGTexture:

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

Class QQuickStyle:

QStringList availableStyles()

Class QCanBus:

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

Class QCanBusFrame:

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

Class QWebEngineDownloadItem:

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

Class QFileDialog:

QString selectedMimeTypeFilter() const

Class QSizePolicy:

QSizePolicy transposed() const

Class QSplitter:

QWidget *replaceWidget(int index, QWidget *widget)

Class QSystemTrayIcon:

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

Class QUndoCommand:

bool isObsolete() const
void setObsolete(bool obsolete)

Class QWidget:

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

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)
QStaticByteArrayMatcher<N> qMakeStaticByteArrayMatcher(const char (&)[N] pattern)
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, FileNameTooLong, …, UserCanceled }
enum ChecksumType { ChecksumIso3309, ChecksumItuV41 }

New Type Aliases

New Properties

New Variables

New QML Types

New QML Properties

New QML Signals

New QML Methods

Additions to Other Qt 5 Releases