New Classes and Functions in Qt 5.1

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

New Classes

A
QAbstractOpenGLFunctions
QAccelerometer
QAccelerometerFilter
QAccelerometerReading
QAltimeter
QAltimeterFilter
QAltimeterReading
QAmbientLightFilter
QAmbientLightReading
QAmbientLightSensor
QAmbientTemperatureFilter
QAmbientTemperatureReading
QAmbientTemperatureSensor
B
Binder (QOpenGLVertexArrayObject)
C
QCompass
QCompassFilter
QCompassReading
D
QDBusVirtualObject
QDebugStateSaver
G
QGlobalStatic
QGyroscope
QGyroscopeFilter
QGyroscopeReading
H
QHolsterFilter
QHolsterReading
QHolsterSensor
I
QIRProximityFilter
QIRProximityReading
QIRProximitySensor
L
QLightFilter
QLightReading
QLightSensor
QLockFile
M
QMagnetometer
QMagnetometerFilter
QMagnetometerReading
QMessageAuthenticationCode
O
QOffscreenSurface
QOpenGLDebugLogger
QOpenGLDebugMessage
QOpenGLFunctions_1_0
QOpenGLFunctions_1_1
QOpenGLFunctions_1_2
QOpenGLFunctions_1_3
QOpenGLFunctions_1_4
QOpenGLFunctions_1_5
QOpenGLFunctions_2_0
QOpenGLFunctions_2_1
QOpenGLFunctions_3_0
QOpenGLFunctions_3_1
QOpenGLFunctions_3_2_Compatibility
QOpenGLFunctions_3_2_Core
QOpenGLFunctions_3_3_Compatibility
QOpenGLFunctions_3_3_Core
QOpenGLFunctions_4_0_Compatibility
QOpenGLFunctions_4_0_Core
QOpenGLFunctions_4_1_Compatibility
QOpenGLFunctions_4_1_Core
QOpenGLFunctions_4_2_Compatibility
QOpenGLFunctions_4_2_Core
QOpenGLFunctions_4_3_Compatibility
QOpenGLFunctions_4_3_Core
QOpenGLFunctions_ES2
QOpenGLTimeMonitor
QOpenGLTimerQuery
QOpenGLVersionProfile
QOpenGLVertexArrayObject
QOrientationFilter
QOrientationReading
QOrientationSensor
P
QPressureFilter
QPressureReading
QPressureSensor
QProximityFilter
QProximityReading
QProximitySensor
Q
QQmlApplicationEngine
QQuickTextDocument
qoutputrange
R
QRegularExpressionValidator
QRotationFilter
QRotationReading
QRotationSensor
S
QSaveFile
QSensor
QSensorBackend
QSensorChangesInterface
QSensorGesture
QSensorGestureManager
QSensorGesturePluginInterface
QSensorGestureRecognizer
QSensorPluginInterface
QSerialPort
QSerialPortInfo
T
QTapFilter
QTapReading
QTapSensor
QTiltFilter
QTiltReading
QTiltSensor
X
QX11Info

New Member Functions

Class QMargins:

QMargins & operator*=(int factor)
QMargins & operator*=(qreal factor)
QMargins & operator+=(const QMargins & margins)
QMargins & operator-=(const QMargins & margins)
QMargins & operator/=(int divisor)
QMargins & operator/=(qreal divisor)

Class QRegularExpression:

QStringList namedCaptureGroups() const

Class QSharedPointer:

QSharedPointer<T> create()
QSharedPointer<T> create(...)

Class QStringRef:

double toDouble(bool * ok = 0) const
float toFloat(bool * ok = 0) const
int toInt(bool * ok = 0, int base = 10) const
long toLong(bool * ok = 0, int base = 10) const
qlonglong toLongLong(bool * ok = 0, int base = 10) const
short toShort(bool * ok = 0, int base = 10) const
uint toUInt(bool * ok = 0, int base = 10) const
ulong toULong(bool * ok = 0, int base = 10) const
qulonglong toULongLong(bool * ok = 0, int base = 10) const
ushort toUShort(bool * ok = 0, int base = 10) const
QStringRef trimmed() const

Class QWindow:

void alert(int msec)

Class QVector3D:

float distanceToPoint(const QVector3D & point) const

Class QVector2D:

float distanceToLine(const QVector2D & point, const QVector2D & direction) const
float distanceToPoint(const QVector2D & point) const

Class QRawFont:

QVector<QPointF> advancesForGlyphIndexes(const QVector<quint32> & glyphIndexes, LayoutFlags layoutFlags) const
bool advancesForGlyphIndexes(const quint32 * glyphIndexes, QPointF * advances, int numGlyphs, LayoutFlags layoutFlags) const

Class QNetworkAccessManager:

void encrypted(QNetworkReply * reply)

Class QNetworkReply:

void encrypted()

Class QLocalSocket:

void connectToServer(OpenMode openMode = ReadWrite)
void setServerName(const QString & name)

Class QSslConfiguration:

QList<QSslCertificate> localCertificateChain() const
void setLocalCertificateChain(const QList<QSslCertificate> & localChain)

Class QSslSocket:

QList<QSslCertificate> localCertificateChain() const
void setLocalCertificateChain(const QList<QSslCertificate> & localChain)

Class QQuickWindow:

bool hasDefaultAlphaBuffer()
void setDefaultAlphaBuffer(bool useAlpha)

Class QQmlExtensionPlugin:

QUrl baseUrl() const

Class QGraphicsView:

void rubberBandChanged(QRect rubberBandRect, QPointF fromScenePoint, QPointF toScenePoint)
QRect rubberBandRect() const

Class QAccelerometer:

void accelerationModeChanged(AccelerationMode accelerationMode)
void setAccelerationMode(AccelerationMode accelerationMode)

Class QLightSensor:

void setFieldOfView(qreal fieldOfView)

Class QSensor:

void setCurrentOrientation(int currentOrientation)
void setEfficientBufferSize(int efficientBufferSize)
void setMaxBufferSize(int maxBufferSize)
void setSkipDuplicates(bool skipDuplicates)
void skipDuplicatesChanged(bool skipDuplicates)

Class QRotationSensor:

void setHasZ(bool hasZ)

New Global Functions

QMargins operator*(qreal factor, const QMargins & margins)
QMargins operator*(const QMargins & margins, qreal factor)
QMargins operator*(int factor, const QMargins & margins)
QMargins operator*(const QMargins & margins, int factor)
QRect operator+(const QMargins & margins, const QRect & rectangle)
QRect operator+(const QRect & rectangle, const QMargins & margins)
QMargins operator+(const QMargins & m1, const QMargins & m2)
QMargins operator-(const QMargins & margins)
QMargins operator-(const QMargins & m1, const QMargins & m2)
QMargins operator/(const QMargins & margins, qreal divisor)
QMargins operator/(const QMargins & margins, int divisor)
double qDegreesToRadians(double degrees)
float qDegreesToRadians(float degrees)
bool qEnvironmentVariableIsEmpty(const char * varName)
bool qEnvironmentVariableIsSet(const char * varName)
float qRadiansToDegrees(float radians)
bool qunsetenv(const char * varName)

New Macros

Q_COREAPP_STARTUP_FUNCTION(QtStartUpFunction ptr)
Q_GLOBAL_STATIC( Type, VariableName)
Q_GLOBAL_STATIC_WITH_ARGS( Type, VariableName, Arguments)

New Enum Types

enum AccelerationMode { Combined, Gravity, User }
enum LayoutFlag { SeparateAdvances, KernedAdvances, UseDesignMetrics }
enum AxesOrientationMode { FixedOrientation, AutomaticOrientation, UserOrientation }
enum Visibility { Windowed, Minimized, Maximized, FullScreen, AutomaticVisibility, Hidden }

New Typedefs

typedef qoutputrangelist
typedef qrange
typedef qrangelist

New Properties

New QML Types

Additions to Other Qt 5 Releases

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