Qt3DCore::QComponent Class
class Qt3DCore::QComponentA classe base dos nós de cena que podem ser agregados por instâncias d Qt3DCore::QEntity s como um componente. Mais...
| Cabeçalho: | #include <QComponent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake: | QT += 3dcore |
| No QML: | Component3D |
| Herdado de: | Qt3DCore::QNode |
| Herdado 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 e Qt3DRender::QShaderData |
| Status: | Obsoleta |
Esta classe está obsoleta. Recomendamos enfaticamente que não seja utilizada em códigos novos.
Propriedades
- isShareable : bool
Funções públicas
| QComponent(Qt3DCore::QNode *parent = nullptr) | |
| QList<Qt3DCore::QEntity *> | entities() const |
| bool | isShareable() const |
Slots públicos
| void | setShareable(bool isShareable) |
Sinais
| void | addedToEntity(Qt3DCore::QEntity *entity) |
| void | removedFromEntity(Qt3DCore::QEntity *entity) |
| void | shareableChanged(bool isShareable) |
Descrição detalhada
Um “ Qt3DCore::QComponent ” fornece uma fatia vertical de comportamento que pode ser atribuída a instâncias de “ Qt3DCore::QEntity ” e, às vezes, compartilhada entre elas.
Qt3DCore::QComponent As subclasses são frequentemente agregadas em grupos que conferem um comportamento útil à entidade agregadora. Por exemplo, para que uma Entidade seja desenhada pelo renderizador Qt3D, ela provavelmente agregaria os componentes ` Qt3DCore::QTransform`, ` Qt3DRender::QMesh` e ` Qt3DRender::QMaterial `.
Veja também Qt3DCore::QEntity.
Documentação de propriedades
isShareable : bool
Contém o sinalizador de compartilhamento do ` QComponent`. O ` QComponent ` pode ser compartilhado entre várias entidades se ` true`.
Funções de acesso:
| bool | isShareable() const |
| void | setShareable(bool isShareable) |
Sinal do notificador:
| void | shareableChanged(bool isShareable) |
Documentação da função membro
[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)
Cria uma nova instância de QComponent tendo parent como pai.
Observação: um QComponent nunca deve ser instanciado diretamente; em vez disso, instancie uma de suas subclasses.
[signal] void QComponent::addedToEntity(Qt3DCore::QEntity *entity)
Indica que foi adicionada uma referência a entity.
QList<Qt3DCore::QEntity *> QComponent::entities() const
Retorna um objeto ` QList ` contendo todas as entidades que fazem referência a este componente.
[signal] void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)
Indica que uma referência foi removida 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.