QSharedData Class

The QSharedData class is a base class for shared data objects. More...

Header: #include <QSharedData>
CMake: find_package(Qt6 COMPONENTS Core REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

Note: All functions in this class are reentrant.

Public Functions

QSharedData(const QSharedData &)
QSharedData()

Detailed Description

QSharedData is designed to be used with QSharedDataPointer or QExplicitlySharedDataPointer to implement custom implicitly shared or explicitly shared classes. QSharedData provides thread-safe reference counting.

See QSharedDataPointer and QExplicitlySharedDataPointer for details.

Member Function Documentation

QSharedData::QSharedData(const QSharedData &)

Constructs a QSharedData object with reference count 0. The parameter is ignored.

QSharedData::QSharedData()

Constructs a QSharedData object with a reference count of 0.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.0/qshareddata.html