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

QByteArray subvolume() const

Class QTemporaryDir:

QString filePath(const QString &fileName) const

Class QObject:

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

Class QDataStream:

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

Class QThreadPool:

bool tryTake(QRunnable *runnable)

Class QByteArray:

QByteArray toHex(char separator) const

Class QStringRef:

QStringRef::const_iterator constBegin() const
QStringRef::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(QImage::Format format)

Class TouchPoint:

QSizeF ellipseDiameters() const

Class QOffscreenSurface:

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

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 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, Functor functor)
int lookupHost(const QString &name, const QObject *context, Functor functor)
int lookupHost(const QString &name, const QObject *receiver, PointerToMemberFunction function)

Class QSizePolicy:

QSizePolicy transposed() const

Class QWidget:

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

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

QWidget *replaceWidget(int index, QWidget *widget)

Class QFileDialog:

QString selectedMimeTypeFilter() const

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 }
enum ChecksumType { ChecksumIso3309, ChecksumItuV41 }

New Properties

New Variables

Additions to Other Qt 5 Releases