QComponent¶
The base class of scene nodes that can be aggregated by
QEntityinstances as a component. More…

Inherited by: QAbstractClipAnimator, QBlendedClipAnimator, QClipAnimator, QArmature, QTransform, QConeMesh, QCuboidMesh, QCylinderMesh, QDiffuseMapMaterial, QDiffuseSpecularMapMaterial, QDiffuseSpecularMaterial, QExtrudedTextMesh, QGoochMaterial, QMetalRoughMaterial, QMorphPhongMaterial, QNormalDiffuseMapAlphaMaterial, QNormalDiffuseMapMaterial, QNormalDiffuseSpecularMapMaterial, QPerVertexColorMaterial, QPhongAlphaMaterial, QPhongMaterial, QPlaneMesh, QSphereMesh, QTextureMaterial, QTorusMesh, QAxisAccumulator, QInputSettings, QKeyboardHandler, QLogicalDevice, QMouseHandler, QFrameAction, QAbstractLight, QAbstractRayCaster, QCameraLens, QComputeCommand, QDirectionalLight, QEnvironmentLight, QGeometryRenderer, QLayer, QLevelOfDetail, QLevelOfDetailSwitch, QMaterial, QMesh, QObjectPicker, QPointLight, QRayCaster, QRenderSettings, QRenderTarget, QSceneLoader, QScreenRayCaster, QShaderData, QSpotLight
Synopsis¶
Functions¶
def
entities()def
isShareable()
Slots¶
def
setShareable(isShareable)
Signals¶
def
addedToEntity(entity)def
removedFromEntity(entity)def
shareableChanged(isShareable)
Detailed Description¶
A
QComponentprovides a vertical slice of behavior that can be assigned to and sometimes shared acrossQEntityinstances.
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 aggregateQTransform,QMesh, andQMaterialcomponents.See also
QEntity
- class PySide2.Qt3DCore.Qt3DCore.QComponent([parent=None])¶
- param parent:
Constructs a new
QComponentinstance withparentas the parent.Note
a
QComponentshould never be instanced directly, instance one of the subclasses instead.
- PySide2.Qt3DCore.Qt3DCore.QComponent.addedToEntity(entity)¶
- Parameters:
entity –
PySide2.Qt3DCore.Qt3DCore.QEntity
- PySide2.Qt3DCore.Qt3DCore.QComponent.entities()¶
- Return type:
Returns a
QVectorcontaining all the entities that reference this component.
- Return type:
bool
Holds the shareable flag of the
QComponent. TheQComponentcan be shared across several entities iftrue.
- PySide2.Qt3DCore.Qt3DCore.QComponent.removedFromEntity(entity)¶
- Parameters:
entity –
PySide2.Qt3DCore.Qt3DCore.QEntity
- Parameters:
isShareable – bool
Holds the shareable flag of the
QComponent. TheQComponentcan be shared across several entities iftrue.
- Parameters:
isShareable – bool
© 2022 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.