PySide6.Qt3DCore.Qt3DCore.QComponent¶
- class QComponent¶
- The base class of scene nodes that can be aggregated by - QEntityinstances as a component. More…- Inherited by: - QShaderData,- QSceneLoader,- QRenderTarget,- QRenderSettings,- QObjectPicker,- QMaterial,- QTextureMaterial,- QPhongMaterial,- QPhongAlphaMaterial,- QPerVertexColorMaterial,- QNormalDiffuseSpecularMapMaterial,- QNormalDiffuseMapMaterial,- QNormalDiffuseMapAlphaMaterial,- QMorphPhongMaterial,- QMetalRoughMaterial,- QGoochMaterial,- QDiffuseSpecularMaterial,- QDiffuseSpecularMapMaterial,- QDiffuseMapMaterial,- QLevelOfDetail,- QLevelOfDetailSwitch,- QLayer,- QEnvironmentLight,- QComputeCommand,- QCameraLens,- QAbstractRayCaster,- QScreenRayCaster,- QRayCaster,- QAbstractLight,- QSpotLight,- QPointLight,- QDirectionalLight,- QFrameAction,- QMouseHandler,- QLogicalDevice,- QKeyboardHandler,- QInputSettings,- QAxisAccumulator,- QTransform,- QCoreSettings,- QBoundingVolume,- QPickingProxy,- QGeometryRenderer,- QMesh,- QTorusMesh,- QSphereMesh,- QPlaneMesh,- QExtrudedTextMesh,- QCylinderMesh,- QCuboidMesh,- QConeMesh,- QArmature,- QAbstractClipAnimator,- QClipAnimator,- QBlendedClipAnimator- Synopsis¶- Properties¶- Methods¶- def - __init__()
- def - entities()
- def - isShareable()
 - Slots¶- def - setShareable()
 - Signals¶- def - addedToEntity()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- A - QComponentprovides a vertical slice of behavior that can be assigned to and sometimes shared across- QEntityinstances.- QComponentsubclasses are often aggregated in groups that impart useful behavior to the aggregating entity. For example, to have an Entity that gets drawn by the Qt3D renderer aspect, an entity would most likely aggregate- QTransform,- QMesh, and- QMaterialcomponents.- See also - QEntity- Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- Holds the shareable flag of the - QComponent. The- QComponentcan be shared across several entities if- true.- Access functions:
 - __init__([parent=None])¶
- Parameters:
- parent – - QNode
 
 - Constructs a new - QComponentinstance with- parentas the parent.- Note - a - QComponentshould never be instanced directly, instance one of the subclasses instead.- addedToEntity(entity)¶
- Parameters:
- entity – - QEntity
 
 - Indicates that a reference has been added to - entity.- entities()¶
- Return type:
- .list of Qt3DCore.QEntity 
 
 - Returns a QList containing all the entities that reference this component. - isShareable()¶
- Return type:
- bool 
 
 - Getter of property - isShareableᅟ.- removedFromEntity(entity)¶
- Parameters:
- entity – - QEntity
 
 - Indicates that a reference has been removed from - entity.- Parameters:
- isShareable – bool 
 - See also - isShareable()
 - Setter of property - isShareableᅟ.- Parameters:
- isShareable – bool 
 
 - Notification signal of property - isShareableᅟ.