- Qt 5.3
- New Classes and Functions in Qt 5.1
- Qt 5.3.2 Reference Documentation

# 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
- New Member Functions
- New Global Functions
- New Macros
- New Enum Types
- New Properties
- New QML Types

### New Classes

A
  QAbstractOpenGLFunctions
  QAltimeter
  QAltimeterFilter
  QAltimeterReading
  QAmbientTemperatureFilter
  QAmbientTemperatureReading
  QAmbientTemperatureSensor

B
  Binder (QOpenGLVertexArrayObject)

D
  QDBusVirtualObject
  QDebugStateSaver

G
  QGlobalStatic

H
  QHolsterFilter
  QHolsterReading
  QHolsterSensor

L
  QLockFile

M
  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

P
  QPressureFilter
  QPressureReading
  QPressureSensor

Q
  QQmlApplicationEngine
  QQuickTextDocument

R
  QRegularExpressionValidator

S
  QSaveFile
  QSerialPort
  QSerialPortInfo

### New Member Functions

Class QNetworkReply:

| encrypted()

Class QLocalSocket:

| connectToServer(OpenMode openMode)
| setServerName(const QString & name)

Class QSslSocket:

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

Class QSslConfiguration:

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

Class QQmlExtensionPlugin:

| baseUrl() const

Class QMargins:

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

Class QRegularExpression:

| namedCaptureGroups() const

Class QSharedPointer:

| create()
| create(...)

Class QStringRef:

| toDouble(bool * ok) const
| toFloat(bool * ok) const
| toInt(bool * ok, int base) const
| toLong(bool * ok, int base) const
| toLongLong(bool * ok, int base) const
| toShort(bool * ok, int base) const
| toUInt(bool * ok, int base) const
| toULong(bool * ok, int base) const
| toULongLong(bool * ok, int base) const
| toUShort(bool * ok, int base) const
| trimmed() const

Class QGraphicsView:

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

Class QQuickWindow:

| hasDefaultAlphaBuffer()
| setDefaultAlphaBuffer(bool useAlpha)

Class QNetworkAccessManager:

| encrypted(QNetworkReply * reply)

Class QWindow:

| alert(int msec)

Class QVector2D:

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

Class QVector3D:

| distanceToPoint(const QVector3D & point) const

Class QRawFont:

| advancesForGlyphIndexes(const QVector<quint32> & glyphIndexes, QFlags<QRawFont::LayoutFlag> layoutFlags) const
| advancesForGlyphIndexes(const quint32 * glyphIndexes, QPointF * advances, int numGlyphs, QFlags<QRawFont::LayoutFlag> layoutFlags) const

### New Global Functions

| operator*(qreal factor, const QMargins & margins)
| operator*(int factor, const QMargins & margins)
| operator*(const QMargins & margins, qreal factor)
| operator*(const QMargins & margins, int factor)
| operator+(const QRect & rectangle, const QMargins & margins)
| operator+(const QMargins & margins, const QRect & rectangle)
| operator+(const QMargins & m1, const QMargins & m2)
| operator-(const QMargins & margins)
| operator-(const QMargins & m1, const QMargins & m2)
| operator/(const QMargins & margins, qreal divisor)
| operator/(const QMargins & margins, int divisor)
| qDegreesToRadians(float degrees)
| qDegreesToRadians(double degrees)
| qEnvironmentVariableIsEmpty(const char * varName)
| qEnvironmentVariableIsSet(const char * varName)
| qRadiansToDegrees(float radians)
| qRadiansToDegrees(double radians)
| 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 | LayoutFlag { SeparateAdvances, KernedAdvances, UseDesignMetrics }
enum | Visibility { Hidden, AutomaticVisibility, Windowed, Minimized, Maximized, FullScreen }

### New Properties

- active : const
- opacity : const
- visibility : const

### New QML Types

A
  ApplicationWindow

B
  Button
  ButtonStyle

C
  CheckBox
  CheckBoxStyle
  CloseEvent
  ColorDialog
  ComboBox
  ComboBoxStyle

F
  FileDialog

G
  GroupBox
  GroupBoxStyle

L
  Label

M
  Menu
  MenuBar

P
  ProgressBar
  ProgressBarStyle

R
  RadioButton
  RadioButtonStyle

S
  ScrollView
  ScrollViewStyle
  Slider
  SliderStyle
  SpinBox
  SplitView
  StackView
  StackViewDelegate
  StatusBar

T
  Tab
  TableView
  TableViewColumn
  TableViewStyle
  TabView
  TabViewStyle
  TextArea
  TextField
  TextFieldStyle
  ToolBar
  ToolButton

## Additions to Other Qt 5 Releases

- What's New in Qt 5.3
- What's New in Qt 5.2
- What's New in Qt 5.0