New Classes and Functions in Qt 5.6

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

New Classes

New Member Functions

Class QSysInfo:

QString machineHostName()

Class QDebug:

void setVerbosity(int verbosityLevel)
int verbosity() const

Class QDir:

QChar listSeparator()

Class QProcess:

void errorOccurred(QProcess::ProcessError error)

Class QStorageInfo:

int blockSize() const

Class QTemporaryDir:

QString errorString() const

Class QTextStream:

QTextStream &operator<<(const QStringRef &string)

Class QItemSelectionRange:

void swap(QItemSelectionRange &other)

Class QPointer:

void swap(QPointer &other)

Class QHistoryState:

QAbstractTransition *defaultTransition() const
void defaultTransitionChanged()
void setDefaultTransition(QAbstractTransition *transition)

Class QByteArray:

const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QCommandLineParser:

void setOptionsAfterPositionalArgumentsMode(OptionsAfterPositionalArgumentsMode parsingMode)

Class QHash:

key_iterator keyBegin() const
key_iterator keyEnd() const

Class QLinkedList:

const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QLocale:

void swap(QLocale &other)

Class QList:

const T &constFirst() const
const T &constLast() const
const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QMap:

QPair<const_iterator, const_iterator> equal_range(const Key &key) const
key_iterator keyBegin() const
key_iterator keyEnd() const

Class QSet:

const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
bool intersects(const QSet<T> &other) const
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QString:

const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QStringRef:

void truncate(int position)

Class QVector:

void append(T &&value)
const T &constFirst() const
const T &constLast() const
const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
void move(int from, int to)
void push_back(T &&value)
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QVarLengthArray:

const_reverse_iterator crbegin() const
const_reverse_iterator crend() const
reverse_iterator rbegin()
const_reverse_iterator rbegin() const
reverse_iterator rend()
const_reverse_iterator rend() const

Class QXmlStreamStringRef:

void swap(QXmlStreamStringRef &other)

Class QDBusMessage:

QDBusMessage createTargetedSignal(const QString &service, const QString &path, const QString &interface, const QString &name)

Class QIcon:

bool isMask() const
void setIsMask(bool isMask)

Class QImage:

QColor pixelColor(int x, int y) const
QColor pixelColor(const QPoint &position) const
void setPixelColor(int x, int y, const QColor &color)
void setPixelColor(const QPoint &position, const QColor &color)

Class QImageReader:

float gamma() const
void setGamma(float gamma)

Class QStandardItem:

bool isAutoTristate() const
bool isUserTristate() const
void setAutoTristate(bool tristate)
void setUserTristate(bool tristate)

Class QDrag:

void cancel()

Class QGuiApplication:


Class QPlatformDrag:

virtual void cancelDrag()

Class QOpenGLFramebufferObject:

void addColorAttachment(const QSize &size, GLenum internalFormat = 0)
void addColorAttachment(int width, int height, GLenum internalFormat = 0)
QVector<QSize> sizes() const
GLuint takeTexture(int colorAttachmentIndex)
QVector<GLuint> textures() const
QImage toImage(bool flipped, int colorAttachmentIndex) const

Class QColor:

QColor fromRgba64(ushort r, ushort g, ushort b, ushort a = USHRT_MAX)
QColor fromRgba64(QRgba64 rgba64)
QRgba64 rgba64() const
void setRgba64(QRgba64 rgba)

Class QPaintDevice:

qreal devicePixelRatioF() const

Class QTextLayout:

void clearFormats()
QVector<FormatRange> formats() const
void setFormats(const QVector<FormatRange> &formats)

Class QNetworkReply:

void redirected(const QUrl &url)

Class QNetworkRequest:

int maximumRedirectsAllowed() const
void setMaximumRedirectsAllowed(int maxRedirectsAllowed)

Class QHostAddress:

bool isMulticast() const

Class QWindowsWindowFunctions:

void setHasBorderInFullScreen(QWindow *window, bool border)
const QByteArray setHasBorderInFullScreenIdentifier()

Class QDesktopWidget:


Class QMainWindow:

void resizeDocks(const QList<QDockWidget *> &docks, const QList<int> &sizes, Qt::Orientation orientation)

Class QMenu:

QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
QAction *addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0)
QAction *addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut = 0)
QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
QAction *addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut = 0)
QAction *addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut = 0)

Class QToolBar:

QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method)
QAction *addAction(const QString &text, Functor functor)
QAction *addAction(const QString &text, const QObject *context, Functor functor)
QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method)
QAction *addAction(const QIcon &icon, const QString &text, Functor functor)
QAction *addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor)

Class QBluetoothSocket:

QBluetooth::SecurityFlags preferredSecurityFlags() const
void setPreferredSecurityFlags(QBluetooth::SecurityFlags flags)

Class QQmlDebuggingEnabler:

bool connectToLocalDebugger(const QString &socketFileName, StartMode mode = DoNotWaitForClient)

Class QJSEngine:

void installExtensions(Extensions extensions, const QJSValue &object = QJSValue())

Class QQuickTextureFactory:

QQuickTextureFactory *textureFactoryForImage(const QImage &image)

Class QMediaPlayer:

void audioRoleChanged(QAudio::Role role)
QList<QAudio::Role> supportedAudioRoles() const

Class QWebEngineDownloadItem:

QString mimeType() const

Class QWebEngineProfile:

QWebEngineCookieStore *cookieStore()
QString httpAcceptLanguage() const
void installUrlSchemeHandler(const QByteArray &scheme, QWebEngineUrlSchemeHandler *handler)
void removeAllUrlSchemeHandlers()
void removeUrlScheme(const QByteArray &scheme)
void removeUrlSchemeHandler(QWebEngineUrlSchemeHandler *handler)
void setHttpAcceptLanguage(const QString &httpAcceptLanguage)
void setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor)
const QWebEngineUrlSchemeHandler *urlSchemeHandler(const QByteArray &scheme) const

Class QWebEnginePage:

void renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode)

Class QWebEngineView:

void renderProcessTerminated(QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode)

Class QWebSocket:

void open(const QNetworkRequest &request)
QNetworkRequest request() const

New Global Functions

bool operator<(const QVector<T> &lhs, const QVector<T> &rhs)
bool operator<(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &rhs)
bool operator<(const QList<T> &lhs, const QList<T> &rhs)
bool operator<=(const QVector<T> &lhs, const QVector<T> &rhs)
bool operator<=(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &rhs)
bool operator<=(const QList<T> &lhs, const QList<T> &rhs)
bool operator>(const QVector<T> &lhs, const QVector<T> &rhs)
bool operator>(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &rhs)
bool operator>(const QList<T> &lhs, const QList<T> &rhs)
bool operator>=(const QVector<T> &lhs, const QVector<T> &rhs)
bool operator>=(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &rhs)
bool operator>=(const QList<T> &lhs, const QList<T> &rhs)
uint qAlpha(QRgba64 rgba64)
uint qBlue(QRgba64 rgba64)
uint qCountLeadingZeroBits(quint64 v)
uint qCountLeadingZeroBits(quint16 v)
uint qCountLeadingZeroBits(quint8 v)
uint qCountLeadingZeroBits(quint32 v)
uint qCountTrailingZeroBits(quint64 v)
uint qCountTrailingZeroBits(quint16 v)
uint qCountTrailingZeroBits(quint8 v)
uint qCountTrailingZeroBits(quint32 v)
int qGlobalQHashSeed()
uint qGreen(QRgba64 rgba64)
uint qHash(QSizePolicy key, uint seed = 0)
uint qHash(const QTransform &key, uint seed = 0)
uint qHash(const QMatrix &key, uint seed = 0)
uint qHash(const QKeySequence &key, uint seed = 0)
uint qHash(const QVersionNumber &key, uint seed = 0)
uint qHash(const QVector<T> &key, uint seed = 0)
uint qHash(const QRegularExpression &key, uint seed = 0)
uint qHash(const QRegExp &key, uint seed = 0)
uint qHash(const QLocale &key, uint seed = 0)
uint qHash(const QList<T> &key, uint seed = 0)
uint qHash(const QMimeType &key, uint seed = 0)
uint qHash(const QUrlQuery &key, uint seed = 0)
QRgba64 qPremultiply(QRgba64 rgba64)
uint qRed(QRgba64 rgba64)
QRgba64 qRgba64(quint64 c)
QRgba64 qRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
void qSetGlobalQHashSeed(int newSeed)
QRgba64 qUnpremultiply(QRgba64 rgba64)

New Macros

QTRY_VERIFY2(condition, message)
QTRY_VERIFY2_WITH_TIMEOUT(condition, message, timeout)
QT_NO_PROCESS_COMBINED_ARGUMENT_START

New Enum Types

enum Role { UnknownRole, MusicRole, VideoRole, VoiceCommunicationRole, ..., GameRole }
enum OptionsAfterPositionalArgumentsMode { ParseAsOptions, ParseAsPositionalArguments }
enum RenderProcessTerminationStatus { NormalTerminationStatus, AbnormalTerminationStatus, CrashedTerminationStatus, KilledTerminationStatus }
enum EnterKeyType { EnterKeyDefault, EnterKeyReturn, EnterKeyDone, EnterKeyGo, ..., EnterKeyPrevious }

New Typedefs

New Properties

New QML Types

New QML Properties

New QML Signals

New QML Methods

list<int> supportedAudioRoles()
int indexOf(url file)
list<int> supportedAudioRoles()
void append(object item)
void clear()
object get(int index)
void insert(int index, object item)
void move(int from, int to, int n = 1)
void remove(int index, int n = 1)
supportedAudioRoles()

Additions to Other Qt 5 Releases

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