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 QByteArray id() const

Class QDir:

bool isEmpty(QDir::Filters filters) const

Class QByteArray:

QByteArray toHex(char separator) const

Class QDataStream:

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

Class QImage:

bool reinterpretAsFormat(QImage::Format format)

Class QIconEngine:

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

Class QOffscreenSurface:

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

Class TouchPoint:

QSizeF ellipseDiameters() const

Class QWindow:

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

Class QOpenGLShaderProgram:

bool addCacheableShaderFromSourceCode(QOpenGLShader::ShaderType type, const QByteArray &source)
bool addCacheableShaderFromSourceCode(QOpenGLShader::ShaderType type, const QString &source)
bool addCacheableShaderFromSourceCode(QOpenGLShader::ShaderType type, const char *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 QTextDocument:

QString toRawText() const

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

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

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 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, ...)

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)

New Enum Types

enum RedirectPolicy { ManualRedirectPolicy, NoLessSafeRedirectPolicy, SameOriginRedirectPolicy, UserVerifiedRedirectPolicy }

New Properties

Additions to Other Qt 5 Releases