New Classes and Functions in Qt 5.3 | Qt 5.12

Qt 5.12 | New Classes and Functions in Qt 5.3

Qt 5.12.5 Reference Documentation

# New Classes and Functions in Qt 5.3

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

- New Namespaces
- 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 Namespaces

namespace | QWebSocketProtocol
namespace | QtAndroid

### New Classes

A
  QAndroidActivityResultReceiver
  QAtomicInteger

C
  QCameraInfo
  QCameraInfoControl

M
  QMacToolBar
  QMacToolBarItem
  QMarginsF
  QMaskGenerator
  QMediaServiceCameraInfoInterface
  QMediaServiceDefaultDeviceInterface

N
  QNearFieldShareManager
  QNearFieldShareTarget

P
  QPageLayout
  QPageSize

Q
  QQuickWidget

S
  QSignalBlocker

W
  QWebSocket
  QWebSocketCorsAuthenticator
  QWebSocketServer

### New Member Functions

Class QBluetoothLocalDevice:

| connectedDevices() const
| deviceConnected(const QBluetoothAddress &address)
| deviceDisconnected(const QBluetoothAddress &address)

Class QFlag:

| operator uint() const

Class QCoreApplication:

| isSetuidAllowed()
| setSetuidAllowed(bool allow)

Class QMessageLogger:

| critical(QMessageLogger::CategoryFunction catFunc) const
| critical(const QLoggingCategory &cat) const
| critical(QMessageLogger::CategoryFunction catFunc, const char *msg, ...) const
| critical(const QLoggingCategory &cat, const char *msg, ...) const
| debug(QMessageLogger::CategoryFunction catFunc) const
| debug(const QLoggingCategory &cat) const
| debug(QMessageLogger::CategoryFunction catFunc, const char *msg, ...) const
| debug(const QLoggingCategory &cat, const char *msg, ...) const
| warning(QMessageLogger::CategoryFunction catFunc) const
| warning(QMessageLogger::CategoryFunction catFunc, const char *msg, ...) const
| warning(const QLoggingCategory &cat, const char *msg, ...) const

Class QProcess:

| processId() const

Class QAtomicInteger:

| fetchAndAndAcquire(T valueToAnd)
| fetchAndAndOrdered(T valueToAnd)
| fetchAndAndRelaxed(T valueToAnd)
| fetchAndAndRelease(T valueToAnd)
| fetchAndOrAcquire(T valueToOr)
| fetchAndOrOrdered(T valueToOr)
| fetchAndOrRelaxed(T valueToOr)
| fetchAndOrRelease(T valueToOr)
| fetchAndSubAcquire(T valueToSub)
| fetchAndSubOrdered(T valueToSub)
| fetchAndSubRelaxed(T valueToSub)
| fetchAndSubRelease(T valueToSub)
| fetchAndXorAcquire(T valueToXor)
| fetchAndXorOrdered(T valueToXor)
| fetchAndXorRelaxed(T valueToXor)
| fetchAndXorRelease(T valueToXor)
| operator T() const
| operator&=(T value)
| operator++()
| operator++(int)
| operator+=(T value)
| operator--()
| operator--(int)
| operator-=(T value)
| operator=(T)
| operator^=(T value)
| operator|=(T value)

Class QByteArray:

| fromCFData(CFDataRef data)
| fromNSData(const NSData *data)
| fromRawCFData(CFDataRef data)
| fromRawNSData(const NSData *data)
| toCFData() const
| toNSData() const
| toRawCFData() const
| toRawNSData() const

Class QJsonArray:

| operator+(const QJsonValue &value) const
| operator+=(const QJsonValue &value)
| operator<<(const QJsonValue &value)

Class QChar:

| joiningType(uint ucs4)
| joiningType() const

Class QRectF:

| marginsAdded(const QMarginsF &margins) const
| marginsRemoved(const QMarginsF &margins) const
| operator+=(const QMarginsF &margins)
| operator-=(const QMarginsF &margins)

Class QSharedPointer:

| swap(QSharedPointer<T> &other)

Class QString:

| contains(QLatin1String str, Qt::CaseSensitivity cs) const
| fromUcs4(const char32_t *str, int size)
| fromUtf16(const char16_t *str, int size)

Class QVarLengthArray:

| contains(const T &value) const
| indexOf(const T &value, int from) const
| lastIndexOf(const T &value, int from) const

Class QDBusServer:

| isAnonymousAuthenticationAllowed() const
| setAnonymousAuthenticationAllowed(bool value)

Class QMouseEvent:

| flags() const
| source() const

Class QOpenGLContext:

| isOpenGLES() const
| openGLModuleHandle()
| openGLModuleType()

Class QPixmap:

| fromImage(QImage &&image, Qt::ImageConversionFlags flags)

Class QSurface:

| supportsOpenGL() const

Class QSurfaceFormat:

| options() const
| setOption(QSurfaceFormat::FormatOption option, bool on)
| setOptions(QSurfaceFormat::FormatOptions options)
| setSwapInterval(int interval)
| swapInterval() const
| testOption(QSurfaceFormat::FormatOption option) const

Class QOpenGLFramebufferObject:

| takeTexture()

Class QOpenGLFunctions:

| glBindTexture(GLenum target, GLuint texture)
| glBlendFunc(GLenum sfactor, GLenum dfactor)
| glClear(GLbitfield mask)
| glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
| glClearStencil(GLint s)
| glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
| glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
| glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
| glCullFace(GLenum mode)
| glDeleteTextures(GLsizei n, const GLuint *textures)
| glDepthFunc(GLenum func)
| glDepthMask(GLboolean flag)
| glDisable(GLenum cap)
| glDrawArrays(GLenum mode, GLint first, GLsizei count)
| glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
| glEnable(GLenum cap)
| glFinish()
| glFlush()
| glFrontFace(GLenum mode)
| glGenTextures(GLsizei n, GLuint *textures)
| glGetBooleanv(GLenum pname, GLboolean *params)
| glGetError()
| glGetFloatv(GLenum pname, GLfloat *params)
| glGetIntegerv(GLenum pname, GLint *params)
| glGetString(GLenum name)
| glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
| glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
| glHint(GLenum target, GLenum mode)
| glIsEnabled(GLenum cap)
| glIsTexture(GLuint texture)
| glLineWidth(GLfloat width)
| glPixelStorei(GLenum pname, GLint param)
| glPolygonOffset(GLfloat factor, GLfloat units)
| glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
| glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
| glStencilFunc(GLenum func, GLint ref, GLuint mask)
| glStencilMask(GLuint mask)
| glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
| glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
| glTexParameterf(GLenum target, GLenum pname, GLfloat param)
| glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
| glTexParameteri(GLenum target, GLenum pname, GLint param)
| glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
| glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
| glViewport(GLint x, GLint y, GLsizei width, GLsizei height)

Class QOpenGLShaderProgram:

| create()

Class QOpenGLTexture:

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

Class QPagedPaintDevice:

| pageLayout() const
| setPageLayout(const QPageLayout &newPageLayout)
| setPageMargins(const QMarginsF &margins)
| setPageMargins(const QMarginsF &margins, QPageLayout::Unit units)
| setPageOrientation(QPageLayout::Orientation orientation)
| setPageSize(const QPageSize &pageSize)

Class QPdfWriter:

| pageLayout() const
| resolution() const
| setPageLayout(const QPageLayout &newPageLayout)
| setPageMargins(const QMarginsF &margins)
| setPageMargins(const QMarginsF &margins, QPageLayout::Unit units)
| setPageOrientation(QPageLayout::Orientation orientation)
| setPageSize(const QPageSize &pageSize)
| setResolution(int resolution)

Class QTextBlock:

| textFormats() const

Class QTextCharFormat:

| setFont(const QFont &font, QTextCharFormat::FontPropertiesInheritanceBehavior behavior)

Class QTextFormat:

| isEmpty() const

Class QPlatformIntegration:

virtual | openGLModuleType()

Class QPlatformSystemTrayIcon:

virtual | createMenu() const

Class QPlatformTheme:

virtual | standardButtonText(int button) const

Class QPlatformWindow:

virtual | normalGeometry() const

Class QMediaServiceProvider:

virtual | cameraOrientation(const QByteArray &device) const
virtual | cameraPosition(const QByteArray &device) const
virtual | defaultDevice(const QByteArray &serviceType) const

Class QMediaServiceProviderHint:

| cameraPosition() const

Class QSslConfiguration:

| allowedNextProtocols() const
| nextNegotiatedProtocol() const
| nextProtocolNegotiationStatus() const
| setAllowedNextProtocols(QList<QByteArray> protocols)

Class QNmeaPositionInfoSource:

| setUserEquivalentRangeError(double uere)
| userEquivalentRangeError() const

Class QPrinter:

| pageLayout() const
| setPageLayout(const QPageLayout &newLayout)
| setPageMargins(const QMarginsF &margins, QPageLayout::Unit units)
| setPageOrientation(QPageLayout::Orientation orientation)
| setPageSize(const QPageSize &pageSize)

Class QPrinterInfo:

| availablePrinterNames()
| defaultPageSize() const
| defaultPrinterName()
| isRemote() const
| maximumPhysicalPageSize() const
| minimumPhysicalPageSize() const
| state() const
| supportedPageSizes() const
| supportedResolutions() const
| supportsCustomPageSizes() const

Class QQuickWindow:

| afterAnimating()
| afterSynchronizing()
| openglContextCreated(QOpenGLContext *context)
| sceneGraphAboutToStop()
| sceneGraphError(QQuickWindow::SceneGraphError error, const QString &message)

Class QSerialPortInfo:

| serialNumber() const

Class QPlainTextEdit:

| find(const QRegExp &exp, QTextDocument::FindFlags options)

Class QTextEdit:

| find(const QRegExp &exp, QTextDocument::FindFlags options)

### New Functions in Namespaces

| androidActivity()
| androidSdkVersion()
| ignoreMessage(QtMsgType type, const QRegularExpression &messagePattern)
| startActivity(const QAndroidJniObject &intent, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver)
| startIntentSender(const QAndroidJniObject &intentSender, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver)

### New Global Functions

| operator+(const QRectF &lhs, const QMarginsF &rhs)
| operator+(const QMarginsF &lhs, const QRectF &rhs)
| operator+(int lhs, const QMargins &rhs)
| operator+(const QMargins &margins)
| operator+(const QMargins &lhs, int rhs)
| operator-(const QRectF &lhs, const QMarginsF &rhs)
| operator-(const QRect &lhs, const QMargins &rhs)
| operator-(const QMargins &lhs, int rhs)
| qHash(const QFont &font, uint seed)
| qHash(long double key, uint seed)
| qHash(float key, uint seed)
| qHash(double key, uint seed)
| qPremultiply(QRgb rgb)
| qRemovePostRoutine(QtCleanUpFunction ptr)
| qUnpremultiply(QRgb rgb)

### New Macros

| QVERIFY_EXCEPTION_THROWN(expression, exceptiontype)
| qCCritical(category, const char *message, ...)
| qCDebug(category, const char *message, ...)
| qCWarning(category, const char *message, ...)

### New Enum Types

enum | Position { UnspecifiedPosition, BackFace, FrontFace }
enum | OpenGLModuleType { LibGL, LibGLES }
enum | SceneGraphError { ContextNotAvailable }
enum | FontPropertiesInheritanceBehavior { FontPropertiesSpecifiedOnly, FontPropertiesAll }
enum | MouseEventFlag { MouseEventCreatedDoubleClick, MouseEventFlagMask }
enum | MouseEventSource { MouseEventNotSynthesized, MouseEventSynthesizedBySystem, MouseEventSynthesizedByQt, MouseEventSynthesizedByApplication }

### New Typedefs

typedef | CategoryFunction

### New Properties

- showGroupSeparator : const
- placeholderText : const
- mousePressAndHoldInterval : const
- baseUrl : const

### New QML Types

C
  Calendar
  CalendarStyle
  CoordinateAnimation

D
  Dialog

M
  Matrix4x4
  MenuBarStyle
  MenuStyle

W
  WebSocket
  WebSocketServer

### New QML Properties

| currentFont
| mipmap

### New QML Methods

| linkAt()
| linkAt()

## 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.4
- What's New in Qt 5.2
- What's New in Qt 5.1
- What's New in Qt 5.0