En esta página

QSharedData Class

La clase `QSharedData` es una clase base para objetos de datos compartidos. Más información...

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

Nota: Todas las funciones de esta clase son reentrantes.

Funciones públicas

QSharedData()
QSharedData(const QSharedData &)
~QSharedData()
QSharedData &operator=(const QSharedData &)

Descripción detallada

QSharedData está diseñada para utilizarse con QSharedDataPointer o QExplicitlySharedDataPointer con el fin de implementar clases personalizadas de uso compartido implícito o explícito. QSharedData proporciona un recuento de referencias seguro para subprocesos.

Consulte QSharedDataPointer y QExplicitlySharedDataPointer para obtener más detalles.

Documentación de las funciones miembro

[noexcept] QSharedData::QSharedData()

Crea un objeto QSharedData con un recuento de referencias igual a 0.

[noexcept] QSharedData::QSharedData(const QSharedData &)

Crea un objeto QSharedData con un recuento de referencias igual a 0. El parámetro se ignora.

[constexpr noexcept default] QSharedData::~QSharedData()

Elimina la instancia de « QSharedData ».

[delete] QSharedData &QSharedData::operator=(const QSharedData &)

Asigna por copia other a esta instancia de QSharedData. Esta función se ha eliminado.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.