- Qt 6.5
- What's new in Qt 6
- New Classes and Functions in Qt 6.2
- Qt 6.5.2 Reference Documentation

# New Classes and Functions in Qt 6.2

This page contains a comprehensive list of all new classes and functions introduced in Qt 6.2.

- New Namespaces
- New Classes
- New Member Functions
- New Functions in Namespaces
- New Global Functions
- New Macros
- New Enum Types
- New Properties
- New Variables
- New QML Types
- New QML Properties
- New QML Methods

### New Namespaces

`(preliminary)` namespace | QtAndroidPrivate

### New Classes

A
  QAndroidActivityResultReceiver
  QAndroidApplication (QNativeInterface)
  QAndroidBinder
  QAndroidIntent
  QAndroidParcel
  QAndroidService
  QAndroidServiceConnection

C
  QColorAxis

H
  QHashSeed

M
  QModbusRtuSerialClient
  QModbusRtuSerialServer

N
  QNmeaSatelliteInfoSource

Q
  QQuick3DInstancing

R
  QRgbaFloat

S
  SystemId (QCalendar)

W
  QWebEngineContextMenuRequest
  QWebEngineHistoryModel
  QWebEngineLoadingInfo
  QWebEngineNavigationRequest
  QWebEngineNewWindowRequest

X
  QX11Application (QNativeInterface)

### New Member Functions

Class QAbstractAxis:

void | labelsTruncatedChanged(bool labelsTruncated)
void | truncateLabelsChanged(bool truncateLabels)

Class QAbstractProxyModel:

QModelIndex | createSourceIndex(int row, int col, void *internalPtr) const

Class QAbstractSocket:

bool | bind(QHostAddress::SpecialAddress addr, quint16 port, QAbstractSocket::BindMode mode)

Class QBarSet:

void | deselectAllBars()
void | deselectBar(int index)
void | deselectBars(const QList<int> &indexes)
bool | isBarSelected(int index) const
void | selectAllBars()
void | selectBar(int index)
void | selectBars(const QList<int> &indexes)
QList<int> | selectedBars() const
QColor | selectedColor() const
void | setBarSelected(int index, bool selected)
void | setSelectedColor(const QColor &color)
void | toggleSelection(const QList<int> &indexes)

Class QBluetoothDeviceDiscoveryAgent:

void | errorOccurred(QBluetoothDeviceDiscoveryAgent::Error error)

Class QBluetoothDeviceInfo:

void | setName(const QString &name)

Class QBluetoothLocalDevice:

void | errorOccurred(QBluetoothLocalDevice::Error error)

Class QBluetoothServer:

void | errorOccurred(QBluetoothServer::Error error)

Class QBluetoothServiceDiscoveryAgent:

void | errorOccurred(QBluetoothServiceDiscoveryAgent::Error error)

Class QBluetoothSocket:

void | errorOccurred(QBluetoothSocket::SocketError error)

Class QByteArray:

qsizetype | lastIndexOf(QByteArrayView bv) const

Class QByteArrayView:

int | compare(QByteArrayView bv, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(QByteArrayView bv) const

Class QCanBusDevice:

virtual QCanBusDeviceInfo | deviceInfo() const

Class QCanBusDeviceInfo:

QString | plugin() const

Class QColorSpace:

QString | description() const
void | setDescription(const QString &description)

Class QFileInfo:

std::filesystem::path | filesystemJunctionTarget() const
QString | junctionTarget() const

Class QFlags:

QFlags<T> | fromInt(QFlags::Int i)
QFlags<T> | operator&(QFlags<T> other) const
QFlags<T> & | operator&=(QFlags<T> mask)
size_t | qHash(QFlags<Enum> flags, size_t seed)
bool | testAnyFlag(Enum flag) const
bool | testAnyFlags(QFlags<T> flags) const
bool | testFlags(QFlags<T> flags) const
QFlags::Int | toInt() const

Class QGeoAddress:

QGeoAddress & | operator=(QGeoAddress &other)
void | setStreetNumber(const QString &streetNumber)
QString | streetNumber() const

Class QGeoAreaMonitorInfo:

QGeoAreaMonitorInfo & | operator=(QGeoAreaMonitorInfo &&other)

Class QGeoAreaMonitorSource:

virtual QVariant | backendProperty(const QString &name) const
virtual bool | setBackendProperty(const QString &name, const QVariant &value)

Class QGeoCoordinate:

QGeoCoordinate & | operator=(QGeoCoordinate &&other)

Class QGeoLocation:

QGeoShape | boundingShape() const
QGeoLocation & | operator=(QGeoLocation &&other)
void | setBoundingShape(const QGeoShape &boundingShape)

Class QGeoPositionInfo:

QGeoPositionInfo & | operator=(QGeoPositionInfo &&other)

Class QGeoSatelliteInfo:

QGeoSatelliteInfo & | operator=(QGeoSatelliteInfo &&other)

Class QGeoSatelliteInfoSource:

virtual QVariant | backendProperty(const QString &name) const
virtual bool | setBackendProperty(const QString &name, const QVariant &value)

Class QGraphicsSceneEvent:

quint64 | timestamp() const

Class QGraphicsSceneWheelEvent:

bool | isInverted() const
Qt::ScrollPhase | phase() const
QPoint | pixelDelta() const

Class QImage:

QSizeF | deviceIndependentSize() const
QImage | fromData(QByteArrayView data, const char *format)
bool | loadFromData(QByteArrayView data, const char *format)

Class QJSEngine:

QJSValue | newSymbol(const QString &name)

Class QJniEnvironment:

jfieldID | findField(jclass clazz, const char *fieldName, const char *signature)
jmethodID | findMethod(jclass clazz, const char *methodName, const char *signature)
jfieldID | findStaticField(jclass clazz, const char *fieldName, const char *signature)
jmethodID | findStaticMethod(jclass clazz, const char *methodName, const char *signature)
bool | isValid() const

Class QJniObject:

QByteArray | className() const
jclass | objectClass() const

Class QLatin1StringView:

qsizetype | lastIndexOf(QStringView str, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(QLatin1StringView l1, Qt::CaseSensitivity cs) const

Class QLegend:

void | attachedToChartChanged(bool attached)
bool | isInteractive() const
void | setInteractive(bool interactive)

Class QLocale:

QLocale::Territory | codeToTerritory(QStringView territoryCode)
QString | nativeTerritoryName() const
QLocale::Territory | territory() const
QString | territoryToCode(QLocale::Territory territory)
QString | territoryToString(QLocale::Territory territory)

Class QLockFile:

void | setStaleLockTime(std::chrono::milliseconds value)
std::chrono::milliseconds | staleLockTimeAsDuration() const
bool | tryLock(std::chrono::milliseconds timeout)

Class QLowEnergyCharacteristic:

QLowEnergyDescriptor | clientCharacteristicConfiguration() const

Class QLowEnergyController:

QLowEnergyController * | createPeripheral(const QBluetoothAddress &localDevice, QObject *parent)
void | errorOccurred(QLowEnergyController::Error newError)
int | mtu() const

Class QLowEnergyService:

void | errorOccurred(QLowEnergyService::ServiceError newError)

Class QMetaMethod:

bool | isConst() const

Class QMetaObject:

QMetaType | metaType() const

Class QModbusRtuSerialServer:

int | interFrameDelay() const
void | setInterFrameDelay(int microseconds)

Class QNativeGestureEvent:

QPointF | delta() const
int | fingerCount() const

Class QAndroidApplication:

jobject | context()
void | hideSplashScreen(int duration)
bool | isActivityContext()
QFuture<QVariant> | runOnAndroidMainThread(const std::function<QVariant ()> &runnable, const QDeadlineTimer timeout)
int | sdkVersion()

Class QNdefFilter:

bool | match(const QNdefMessage &message) const

Class QNdefMessage:

QNdefMessage & | operator=(const QNdefMessage &other)
QNdefMessage & | operator=(QNdefMessage &&other)

Class QNdefRecord:

void | clear()

Class QNearFieldManager:

bool | isEnabled() const
void | setUserInformation(const QString &message)
void | targetDetectionStopped()

Class QNetworkAddressEntry:

QDebug | operator<<(QDebug debug, const QNetworkAddressEntry &entry)

Class QNetworkRequest:

qint64 | decompressedSafetyCheckThreshold() const
void | setDecompressedSafetyCheckThreshold(qint64 threshold)

Class QPixmap:

QSizeF | deviceIndependentSize() const

Class QQmlContext:

QObject * | objectForName(const QString &name) const

Class QQmlListReference:

qsizetype | size() const

Class QQuickItemGrabResult:

bool | saveToFile(const QUrl &filePath) const

Class QQuickRenderTarget:

QQuickRenderTarget | fromOpenGLRenderBuffer(uint renderbufferId, const QSize &pixelSize, int sampleCount)

Class QSqlQuery:

QSqlQuery & | operator=(QSqlQuery &&other)
void | swap(QSqlQuery &other)

Class QSqlQueryModel:

void | setQuery(QSqlQuery &&query)

Class QString:

qsizetype | lastIndexOf(QLatin1StringView str, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(const QString &str, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(QStringView str, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(const QRegularExpression &re, QRegularExpressionMatch *rmatch) const

Class QStringView:

qsizetype | lastIndexOf(QStringView str, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(QLatin1StringView l1, Qt::CaseSensitivity cs) const
qsizetype | lastIndexOf(const QRegularExpression &re, QRegularExpressionMatch *rmatch) const

Class QTimeZone:

QLocale::Territory | territory() const

Class QUntypedBindable:

QMetaType | metaType() const

Class QWaylandBufferRef:

bool | hasProtectedContent() const

Class QWebEnginePage:

void | loadingChanged(const QWebEngineLoadingInfo &loadingInfo)
void | navigationRequested(QWebEngineNavigationRequest &request)
void | newWindowRequested(QWebEngineNewWindowRequest &request)

Class QWebEngineProfile:

void | requestIconForIconURL(const QUrl &url, int desiredSizeInPixel, std::function<void (const QIcon &, const QUrl &)> iconAvailableCallback) const
void | requestIconForPageURL(const QUrl &url, int desiredSizeInPixel, std::function<void (const QIcon &, const QUrl &, const QUrl &)> iconAvailableCallback) const

Class QWebEngineView:

QWebEngineView * | forPage(const QWebEnginePage *page)
QWebEngineContextMenuRequest * | lastContextMenuRequest() const
void | pdfPrintingFinished(const QString &filePath, bool success)
void | print(QPrinter *printer)
void | printFinished(bool success)
void | printRequested()
void | printToPdf(const QString &filePath, const QPageLayout &layout, const QPageRanges &ranges)
void | printToPdf(const std::function<void (const QByteArray &)> &resultCallback, const QPageLayout &layout, const QPageRanges &ranges)

Class QWebSocket:

void | alertReceived(QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
void | alertSent(QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
void | continueInterruptedHandshake()
void | handshakeInterruptedOnError(const QSslError &error)
void | peerVerifyError(const QSslError &error)

Class QWebSocketServer:

void | alertReceived(QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
void | alertSent(QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
void | handshakeInterruptedOnError(const QSslError &error)

Class QXYSeries:

QPair<qreal, qreal> | bestFitLineEquation(bool &ok) const
void | clearPointConfiguration(const int index)
void | clearPointConfiguration(const int index, const QXYSeries::PointConfiguration key)
void | clearPointsConfiguration()
void | clearPointsConfiguration(const QXYSeries::PointConfiguration key)
void | colorBy(const QList<qreal> &sourceData, const QLinearGradient &gradient)
void | deselectAllPoints()
void | deselectPoint(int index)
void | deselectPoints(const QList<int> &indexes)
bool | isPointSelected(int index)
const QImage & | lightMarker() const
void | lightMarkerChanged(const QImage &lightMarker)
qreal | markerSize() const
QHash<QXYSeries::PointConfiguration, QVariant> | pointConfiguration(const int index) const
QHash<int, QHash<QXYSeries::PointConfiguration, QVariant>> | pointsConfiguration() const
void | selectAllPoints()
void | selectPoint(int index)
void | selectPoints(const QList<int> &indexes)
const QImage & | selectedLightMarker() const
QList<int> | selectedPoints() const
void | setLightMarker(const QImage &lightMarker)
void | setMarkerSize(qreal size)
void | setPointConfiguration(const int index, const QHash<QXYSeries::PointConfiguration, QVariant> &configuration)
void | setPointConfiguration(const int index, const QXYSeries::PointConfiguration key, const QVariant &value)
void | setPointSelected(int index, bool selected)
void | setPointsConfiguration(const QHash<int, QHash<QXYSeries::PointConfiguration, QVariant>> &pointsConfiguration)
void | setSelectedLightMarker(const QImage &selectedLightMarker)
void | sizeBy(const QList<qreal> &sourceData, const qreal minSize, const qreal maxSize)
void | toggleSelection(const QList<int> &indexes)

### New Functions in Namespaces

void | beginPropertyUpdateGroup()
bool | bindService(const QAndroidIntent &serviceIntent, const QAndroidServiceConnection &serviceConnection, QtAndroidPrivate::BindFlags flags)
`(preliminary)` QFuture<QtAndroidPrivate::PermissionResult> | checkPermission(const QString &permission)
void | endPropertyUpdateGroup()
`(preliminary)` QFuture<QtAndroidPrivate::PermissionResult> | requestPermission(const QString &permission)
void | startActivity(const QJniObject &intent, int receiverRequestCode, std::function<void (int, int, const QJniObject &)> callbackFunc)
void | startActivity(const QAndroidIntent &intent, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver)
void | startActivity(const QJniObject &intent, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver)
void | startIntentSender(const QJniObject &intentSender, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver)

### New Global Functions

std::underlying_type_t<Enum> | qToUnderlying(Enum e)
const char * | qWebEngineChromiumVersion()
const char * | qWebEngineVersion()

### New Macros

| PRIXQUINTPTR
| PRIdQINTPTR
| PRIdQPTRDIFF
| PRIdQSIZETYPE
| PRIiQINTPTR
| PRIiQPTRDIFF
| PRIiQSIZETYPE
| PRIoQUINTPTR
| PRIuQUINTPTR
| PRIxQUINTPTR
| Q_IMPORT_QML_PLUGIN(PluginName)

### New Enum Types

enum | RubberBand { NoRubberBand, VerticalRubberBand, HorizontalRubberBand, RectangleRubberBand, ClickThroughRubberBand }
enum | SocketOption { NoOptions, AbstractNamespaceOption }
enum | DiscoveryMode { FullDiscovery, SkipValueDiscovery }
enum | EditFlag { CanUndo, CanRedo, CanCut, CanCopy, CanPaste, …, CanEditRichly }
enum | MediaFlag { MediaInError, MediaPaused, MediaMuted, MediaLoop, MediaCanSave, …, MediaCanRotate }
enum | MediaType { MediaTypeNone, MediaTypeImage, MediaTypeVideo, MediaTypeAudio, MediaTypeCanvas, …, MediaTypePlugin }
enum class | PointConfiguration { Color, Size, Visibility, LabelVisibility, LabelFormat }
enum class | BindFlag { None, AutoCreate, DebugUnbind, NotForeground, AboveClient, …, ExternalService }

### New Properties

socketOptions : isBehindCaptivePortal : const threadPriority : const loading : const | bestFitLineColor : const bestFitLineVisible : const selectedColor : const

### New Variables

| CCCDDisable
| CCCDEnableIndication
| CCCDEnableNotification

### New QML Types

A
  Affector3D
  Attractor3D

D
  Dialog
  Direction3D

E
  EmitBurst3D

F
  FileDialog
  FileInstancing
  FontDialog

G
  Gravity3D

I
  InstanceListEntry
  InstanceRange
  Instancing

M
  ModelParticle3D

P
  Particle3D
  ParticleAbstractShape3D
  ParticleEmitter3D
  ParticleModelShape3D
  ParticleShape3D
  ParticleSystem3D
  ParticleSystem3DLogging
  PointRotator3D

R
  RandomInstancing
  RuntimeLoader

S
  SelectionRectangle
  SpriteParticle3D
  SpriteSequence3D
  StandardPaths

T
  TargetDirection3D
  TrailEmitter3D

V
  VectorDirection3D

W
  Wander3D

### New QML Properties

QML Type ColorGroup:

| placeholderText : color

QML Type Image:

| mirrorVertically : bool

QML Type SystemPalette:

| placeholderText : color

QML Type TableView:

| selectionModel : ItemSelectionModel

QML Type Texture:

| autoOrientation : bool

### New QML Methods

QML Type Locale:

string | formattedDataSize(int bytes, int precision, DataSizeFormat format)

QML Type TableView:

real | columnWidth(int column)
real | implicitColumnWidth(int column)
real | implicitRowHeight(int row)
bool | isColumnLoaded(int column)
bool | isRowLoaded(int row)
real | rowHeight(int row)

QML Type View3D:

List<PickResult> | pickAll(float x, float y)
PickResult | rayPick(vector3d origin, vector3d direction)
List<PickResult> | rayPickAll(vector3d origin, vector3d direction)