Qt3DCore::QComponent Class
class Qt3DCore::QComponentClasse de base des nœuds de scène qui peuvent être agrégés par Qt3DCore::QEntity en tant que composants. Plus d'informations...
| En-tête : | #include <QComponent> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3DCore)target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake : | QT += 3dcore |
| En QML : | Component3D |
| Hérite : | Qt3DCore::QNode |
| Héritée par : | 24 typesQt3DAnimation::QAbstractClipAnimator Qt3DCore::QArmature, , , , , , , , , , , , , , , , , , , , , , et 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 Qt3DRender::QShaderData |
| Statut : | Déclassé |
Propriétés
- isShareable : bool
Fonctions publiques
| QComponent(Qt3DCore::QNode *parent = nullptr) | |
| QList<Qt3DCore::QEntity *> | entities() const |
| bool | isShareable() const |
Emplacements publics
| void | setShareable(bool isShareable) |
Signaux
| void | addedToEntity(Qt3DCore::QEntity *entity) |
| void | removedFromEntity(Qt3DCore::QEntity *entity) |
| void | shareableChanged(bool isShareable) |
Description détaillée
Un site Qt3DCore::QComponent fournit une tranche verticale de comportement qui peut être attribuée et parfois partagée entre les instances de Qt3DCore::QEntity.
Qt3DCore::QComponent Les sous-classes sont souvent agrégées en groupes qui confèrent un comportement utile à l'entité agrégée. Par exemple, pour avoir une entité qui est dessinée par l'aspect de rendu Qt3D, une entité agrégera probablement les composants Qt3DCore::QTransform, Qt3DRender::QMesh, et Qt3DRender::QMaterial.
Voir également Qt3DCore::QEntity.
Documentation sur les propriétés
isShareable : bool
Détient le drapeau partageable du site QComponent. Le site QComponent peut être partagé entre plusieurs entités si true.
Fonctions d'accès :
| bool | isShareable() const |
| void | setShareable(bool isShareable) |
Signal du notificateur :
| void | shareableChanged(bool isShareable) |
Fonction membre Documentation
[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)
Construit une nouvelle instance de QComponent avec parent comme parent.
Note : un QComponent ne doit jamais être instancié directement, mais plutôt une des sous-classes.
[signal] void QComponent::addedToEntity(Qt3DCore::QEntity *entity)
Indique qu'une référence a été ajoutée à entity.
QList<Qt3DCore::QEntity *> QComponent::entities() const
Renvoie une adresse QList contenant toutes les entités qui font référence à ce composant.
[signal] void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)
Indique qu'une référence a été supprimée 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.