Qt3DCore::QComponent Class
class Qt3DCore::QComponentLa clase base de los nodos de escena que pueden ser agregados por instancias de « Qt3DCore::QEntity » como un componente. Más información...
| Encabezado: | #include <QComponent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake: | QT += 3dcore |
| En QML: | Component3D |
| Heredado de: | Qt3DCore::QNode |
| Heredado por: | 24 tiposQt3DAnimation::QAbstractClipAnimator, Qt3DCore::QArmature, Qt3DCore::QBoundingVolume, Qt3DCore::QCoreSettings, Qt3DCore::QTransform, Qt3DInput::QAxisAccumulator, Qt3DInput::QInputSettings, Qt3DInput::QKeyboardHandler, Qt3DInput::QLogicalDevice, Qt3DInput::QMouseHandler, Qt3DLogic::QFrameAction, Qt3DRender::QAbstractLight, Qt3DRender::QAbstractRayCaster, Qt3DRender::QCameraLens, Qt3DRender::QComputeCommand, Qt3DRender::QEnvironmentLight, Qt3DRender::QLayer, Qt3DRender::QLevelOfDetail, Qt3DRender::QMaterial, Qt3DRender::QObjectPicker, Qt3DRender::QRenderSettings, Qt3DRender::QRenderTarget, Qt3DRender::QSceneLoader y Qt3DRender::QShaderData |
| Estado: | Obsoleta |
Esta clase está obsoleta. Se desaconseja encarecidamente su uso en código nuevo.
Propiedades
- isShareable : bool
Funciones públicas
| QComponent(Qt3DCore::QNode *parent = nullptr) | |
| QList<Qt3DCore::QEntity *> | entities() const |
| bool | isShareable() const |
Ranuras públicas
| void | setShareable(bool isShareable) |
Señales
| void | addedToEntity(Qt3DCore::QEntity *entity) |
| void | removedFromEntity(Qt3DCore::QEntity *entity) |
| void | shareableChanged(bool isShareable) |
Descripción detallada
Un « Qt3DCore::QComponent » proporciona una sección vertical de comportamiento que puede asignarse a instancias de « Qt3DCore::QEntity » y, en ocasiones, compartirse entre ellas.
Qt3DCore::QComponent Las subclases suelen agruparse en conjuntos que aportan un comportamiento útil a la entidad que las agrupa. Por ejemplo, para que una entidad sea dibujada por el renderizador Qt3D, lo más probable es que agrupe los componentes « Qt3DCore::QTransform », « Qt3DRender::QMesh » y « Qt3DRender::QMaterial ».
Véase también Qt3DCore::QEntity.
Documentación de propiedades
isShareable : bool
Contiene el indicador de compartibilidad de la clase « QComponent ». El « QComponent » puede compartirse entre varias entidades si se cumple la condición « true ».
Funciones de acceso:
| bool | isShareable() const |
| void | setShareable(bool isShareable) |
Señal del notificador:
| void | shareableChanged(bool isShareable) |
Documentación de las funciones de miembro
[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)
Crea una nueva instancia de QComponent con parent como padre.
Nota: nunca se debe instanciar directamenteun QComponent; en su lugar, se debe instanciar una de sus subclases.
[signal] void QComponent::addedToEntity(Qt3DCore::QEntity *entity)
Indica que se ha añadido una referencia a entity.
QList<Qt3DCore::QEntity *> QComponent::entities() const
Devuelve un objeto ` QList ` que contiene todas las entidades que hacen referencia a este componente.
[signal] void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)
Indica que se ha eliminado una referencia de entity.
© 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.