QSharedData Class | Qt Core 5.6

Qt 5.6 | Qt Core | C++ Classes | QSharedData

Qt 5.6.2 Reference Documentation

# QSharedData Class

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

Header: | #include <QSharedData>
qmake: | QT += core

- List of all members, including inherited members

Note: All functions in this class are reentrant.

## Public Functions

| QSharedData()
| QSharedData(const QSharedData &other)

## Detailed Description

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

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()

Constructs a QSharedData object with a reference count of 0.

### QSharedData::QSharedData(const QSharedData &other)

Constructs a QSharedData object with reference count 0. other is ignored.