Qt 5.8 | New Classes and Functions in Qt 5.1

Qt 5.8.0 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 Typedefs
- New Properties
- New QML Types
- New QML Properties
- New QML Signals
- New QML Methods

### 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
  qoutputrange

P
  QPressureFilter
  QPressureReading
  QPressureSensor
  QProximityFilter
  QProximityReading
  QProximitySensor

Q
  QQmlApplicationEngine
  QQuickTextDocument

R
  QRegularExpressionValidator
  QRotationFilter
  QRotationReading
  QRotationSensor

S
  QSaveFile
  QSensor
  QSensorBackend
  QSensorChangesInterface
  QSensorGesture
  QSensorGestureManager
  QSensorGesturePluginInterface
  QSensorGestureRecognizer
  QSensorPluginInterface
  QSerialPort
  QSerialPortInfo

T
  QTapFilter
  QTapReading
  QTapSensor
  QTiltFilter
  QTiltReading
  QTiltSensor

### New Member Functions

Class QMenu:

| addSection(const QIcon &icon, const QString &text)
| addSection(const QString &text)
| insertSection(QAction *before, const QIcon &icon, const QString &text)
| insertSection(QAction *before, const QString &text)

Class QAbstractFileEngine:

virtual | renameOverwrite(const QString &newName)
virtual | syncToDisk()

Class QProcess:

| setArguments(const QStringList &arguments)
| setProgram(const QString &program)
| start(OpenMode mode)

Class QUrl:

| fromStringList(const QStringList &urls, ParsingMode mode)
| toStringList(const QList<QUrl> &urls, FormattingOptions options)

Class QMetaMethod:

| revision() const

Class QMetaProperty:

| revision() const

Class QChar:

| script(uint ucs4)
| script() const

Class QLocale:

| toDouble(const QStringRef &s, bool *ok) const
| toFloat(const QStringRef &s, bool *ok) const
| toInt(const QStringRef &s, bool *ok) const
| toLongLong(const QStringRef &s, bool *ok) const
| toShort(const QStringRef &s, bool *ok) const
| toUInt(const QStringRef &s, bool *ok) const
| toULongLong(const QStringRef &s, bool *ok) const
| toUShort(const QStringRef &s, bool *ok) const

Class QMap:

| insert(const_iterator pos, const Key &key, const T &value)
| insertMulti(const_iterator pos, const Key &key, const T &value)

Class QMultiMap:

| insert(QMap<Key, T>::const_iterator pos, const Key &key, const T &value)

Class QMargins:

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

Class QPoint:

| dotProduct(const QPoint &p1, const QPoint &p2)

Class QPointF:

| dotProduct(const QPointF &p1, const QPointF &p2)

Class QRect:

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

Class QRegularExpression:

| namedCaptureGroups() const

Class QSharedPointer:

| create()
| create(...)

Class QString:

| contains(const QRegularExpression &re, QRegularExpressionMatch *match) const

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 QVarLengthArray:

| squeeze()

Class QVector:

| removeFirst()
| removeLast()
| takeFirst()
| takeLast()

Class QIcon:

| actualSize(QWindow *window, const QSize &size, Mode mode, State state) const
| pixmap(QWindow *window, const QSize &size, Mode mode, State state) const

Class QInputMethod:

| inputItemRectangle() const
| setInputItemRectangle(const QRectF &rect)

Class QKeySequence:

| listFromString(const QString &str, SequenceFormat format)
| listToString(const QList<QKeySequence> &list, SequenceFormat format)

Class QPlatformTheme:

virtual | createIconEngine(const QString &iconName) const

Class QPlatformWindow:

virtual | isAlertState() const
virtual | setAlertState(bool enable)

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 QPlatformFontDatabase:

| writingSystemsFromTrueTypeBits(quint32[4] unicodeRange, quint32[2] codePageRange)

Class QRawFont:

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

Class QNetworkAccessManager:

| encrypted(QNetworkReply *reply)

Class QNetworkReply:

| encrypted()

Class QLocalSocket:

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

Class QSslConfiguration:

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

Class QSslSocket:

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

Class QQmlExtensionPlugin:

| baseUrl() const

Class QQuickItem:

| forceActiveFocus(Qt::FocusReason reason)

Class QQuickWindow:

| closing(QQuickCloseEvent *close)
| hasDefaultAlphaBuffer()
| setDefaultAlphaBuffer(bool useAlpha)

Class QGraphicsView:

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

Class QAccelerometer:

| accelerationModeChanged(AccelerationMode accelerationMode)
| setAccelerationMode(AccelerationMode accelerationMode)

Class QLightSensor:

| setFieldOfView(qreal fieldOfView)

Class QRotationSensor:

| setHasZ(bool hasZ)

Class QSensor:

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

Class QSqlRecord:

| keyValues(const QSqlRecord &keyFields) const

Class QSqlTableModel:

| primaryValues(int row) 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 | AccelerationMode { Combined, Gravity, User }
enum | Script { Script_Unknown, Script_Inherited, Script_Common, Script_Latin, ..., ScriptCount }
enum | LayoutFlag { SeparateAdvances, KernedAdvances, UseDesignMetrics }
enum | AxesOrientationMode { FixedOrientation, AutomaticOrientation, UserOrientation }
enum | Visibility { Hidden, AutomaticVisibility, Windowed, Minimized, Maximized, FullScreen }
enum | ApplicationState { ApplicationSuspended, ApplicationHidden, ApplicationInactive, ApplicationActive }
enum | Edge { TopEdge, LeftEdge, RightEdge, BottomEdge }

### New Typedefs

typedef | qoutputrangelist
typedef | qrange
typedef | qrangelist

### New Properties

- accelerationMode : const
- toolTipsVisible : const
- textInteractionFlags : const
- axesOrientationMode : const
- currentOrientation : const

- skipDuplicates : const
- userOrientation : const
- 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
  TabView
  TabViewStyle
  TableView
  TableViewColumn
  TableViewStyle
  TextArea
  TextField
  TextFieldStyle
  ToolBar
  ToolButton

### New QML Properties

| active
| activeFocusItem
| application
| contentOrientation
| desktopAvailableHeight
| desktopAvailableWidth
`(obsolete)` | logicalPixelDensity
| maximumHeight
| maximumWidth
| minimumHeight
| minimumWidth
| name
| opacity
| platform
| selectByKeyboard
| textDocument
| visibility

### New QML Signals

| closing()

### New QML Methods

| forceLayout()
| forceActiveFocus()
| nextItemInFocusChain()
| forceLayout()
| alert()
| requestActivate()

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