Qt 5.13 | New Classes and Functions in Qt 5.4

Qt 5.13.2 Reference Documentation

# New Classes and Functions in Qt 5.4

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

- New Classes
- New Member Functions
- New Functions in Namespaces
- New Global Functions
- New Macros
- New Enum Types
- New Typedefs
- New Properties
- New QML Types
- New QML Properties
- New QML Methods

### New Classes

B
  QByteArrayList

C
  QCocoaNativeContext

E
  QEGLNativeContext
  QEnableSharedFromThis

G
  QGLXNativeContext

O
  QOpenGLWidget
  QOpenGLWindow

P
  QPaintDeviceWindow
  QPixelFormat

R
  QRasterWindow

S
  QStorageInfo

W
  QWGLNativeContext

### New Member Functions

Class QStringRef:

QStringRef::const_iterator | begin() const
QStringRef::const_iterator | cbegin() const
QStringRef::const_iterator | cend() const
QStringRef::const_iterator | end() const
QVector<QStringRef> | split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const
QVector<QStringRef> | split(QChar sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const

Class QVector:

int | removeAll(const T &t)
bool | removeOne(const T &t)

Class QStringList:

QStringList & | operator<<(const QList<QString> &other)
QStringList & | operator=(const QList<QString> &other)
QStringList & | operator=(QList<QString> &&other)

Class QString:

QVector<QStringRef> | splitRef(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const
QVector<QStringRef> | splitRef(QChar sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const
QVector<QStringRef> | splitRef(const QRegExp &rx, QString::SplitBehavior behavior) const
QVector<QStringRef> | splitRef(const QRegularExpression &re, QString::SplitBehavior behavior) const

Class QHash:

uint | qHashBits(const void *p, size_t len, uint seed)

Class QAbstractProxyModel:

virtual bool | canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override
virtual bool | dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override

Class QAbstractState:

void | activeChanged(bool active)

Class QAbstractTransition:

void | targetStateChanged()
void | targetStatesChanged()

Class QWeakPointer:

QSharedPointer<T> | lock() const
void | swap(QWeakPointer<T> &other)

Class QEnableSharedFromThis:

QSharedPointer<T> | sharedFromThis()
QSharedPointer<const T> | sharedFromThis() const

Class QDebug:

QDebug & | maybeQuote(char c)
QDebug & | noquote()
QDebug & | quote()
QDebug & | resetFormat()

Class QRegularExpression:

void | optimize() const

Class QUrl:

QUrl | fromUserInput(const QString &userInput, const QString &workingDirectory, QUrl::UserInputResolutionOptions options)

Class QCommandLineParser:

bool | addOptions(const QList<QCommandLineOption> &options)
void | showVersion()

Class QHistoryState:

void | defaultStateChanged()
void | historyTypeChanged()

Class QSysInfo:

QString | buildAbi()
QString | buildCpuArchitecture()
QString | currentCpuArchitecture()
QString | kernelType()
QString | kernelVersion()
QString | prettyProductName()
QString | productType()
QString | productVersion()

Class QByteArray:

QByteArray | fromStdString(const std::string &str)
std::string | toStdString() const

Class QSignalTransition:

void | senderObjectChanged()
void | signalChanged()

Class QState:

void | childModeChanged()
void | errorStateChanged()
void | initialStateChanged()

Class QStateMachine:

void | runningChanged(bool running)

Class QTimer:

void | singleShot(int msec, const QObject *receiver, PointerToMemberFunction method)
void | singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, PointerToMemberFunction method)
void | singleShot(int msec, Functor functor)
void | singleShot(int msec, Qt::TimerType timerType, Functor functor)
void | singleShot(int msec, const QObject *context, Functor functor)
void | singleShot(int msec, Qt::TimerType timerType, const QObject *context, Functor functor)

Class QPlatformDrag:

virtual bool | ownsDragObject() const

Class QPlatformWindow:

QPlatformScreen * | screenForGeometry(const QRect &newGeometry) const

Class QSurfaceFormat:

QSurfaceFormat | defaultFormat()
void | setDefaultFormat(const QSurfaceFormat &format)

Class QGuiApplication:

void | paletteChanged(const QPalette &palette)
void | screenRemoved(QScreen *screen)

Class QImageReader:

QByteArray | subType() const
QList<QByteArray> | supportedSubTypes() const

Class QImageWriter:

void | setSubType(const QByteArray &type)
QByteArray | subType() const
QList<QByteArray> | supportedSubTypes() const

Class QOpenGLContext:

QVariant | nativeHandle() const
void | setNativeHandle(const QVariant &handle)

Class QOpenGLTexture:

QOpenGLTexture::DepthStencilMode | depthStencilMode() const
void | setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
QOpenGLTexture::Target | target() const

Class QSslCertificate:

bool | importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *certificate, QList<QSslCertificate> *caCertificates, const QByteArray &passPhrase)
bool | isSelfSigned() const

Class QSslSocket:

QSsl::SslProtocol | sessionProtocol() const
long | sslLibraryBuildVersionNumber()
QString | sslLibraryBuildVersionString()

Class QSslConfiguration:

QSsl::SslProtocol | sessionProtocol() const

Class QPrinterInfo:

QPrinter::DuplexMode | defaultDuplexMode() const
QList<QPrinter::DuplexMode> | supportedDuplexModes() const

Class QGraphicsSceneMouseEvent:

Qt::MouseEventFlags | flags() const
Qt::MouseEventSource | source() const

### New Functions in Namespaces

QFuture<T> | run(QThreadPool *pool, Function function, ...)

### New Global Functions

QString | qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &str)
QString | qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &str)
uint | qHash(const QSslError &key, uint seed)
uint | qHash(const QSslCertificate &key, uint seed)
uint | qHashBits(const void *p, size_t len, uint seed)
quint64 | qNextPowerOfTwo(qint64 value)
quint32 | qNextPowerOfTwo(qint32 value)
quint64 | qNextPowerOfTwo(quint64 value)
quint32 | qNextPowerOfTwo(quint32 value)
quint64 | qNextPowerOfTwo(qint64 value)
quint32 | qNextPowerOfTwo(qint32 value)
quint64 | qNextPowerOfTwo(quint64 value)
quint32 | qNextPowerOfTwo(quint32 value)

### New Macros

| Q_LOGGING_CATEGORY(name, string, msgType)
| Q_LOGGING_CATEGORY(name, string, msgType)
const char * | qUtf8Printable(const QString &str)
const char * | qUtf8Printable(const QString &str)

### New Enum Types

enum | DepthStencilMode { DepthMode, StencilMode }
enum | UserInputResolutionOption { DefaultResolution, AssumeLocalFile }

### New Typedefs

typedef | const_iterator

### New Properties

- active : const
- minimumRenderSize : const
- running : const

- autoHide : const
- changeCurrentOnDrag : const
- tabBarAutoHide : const

### New QML Types

A
  ApplicationWindowStyle

F
  FinalState
  FontMetrics

H
  HistoryState

O
  OpenGLInfo

Q
  QAbstractState
  QAbstractTransition
  QSignalTransition
  QtMultimedia

S
  SignalTransition
  State
  StateMachine

T
  TextMetrics
  TimeoutTransition

W
  WebChannel

### New QML Properties

| active
| activeFocusItem
| containsPress
| contentItem
| deviceId
| devicePixelRatio
| displayName
| ignored
| metaData.cameraManufacturer
| metaData.cameraModel
| metaData.dateTimeOriginal
| metaData.event
| metaData.gpsAltitude
| metaData.gpsImgDirection
| metaData.gpsLatitude
| metaData.gpsLongitude
| metaData.gpsProcessingMethod
| metaData.gpsSpeed
| metaData.gpsTimestamp
| metaData.gpsTrack
| metaData.orientation
| metaData.subject
| orientation
| orientationUpdateMask
| passwordMaskDelay
| position
| sidebarVisible
| viewfinder.maximumFrameRate
| viewfinder.minimumFrameRate
| viewfinder.resolution
| visibility

### New QML Methods

| ensureVisible()
| findChild()
| findChild()

## Additions to Other Qt 5 Releases

- What's New in Qt 5.6
- What's New in Qt 5.5
- What's New in Qt 5.3
- What's New in Qt 5.2
- What's New in Qt 5.1
- What's New in Qt 5.0