QComponent

The base class of scene nodes that can be aggregated by QEntity instances 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

Slots

Signals

Detailed Description

A QComponent provides a vertical slice of behavior that can be assigned to and sometimes shared across QEntity instances.

QComponent subclasses 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 QMaterial components.

See also

QEntity

class PySide2.Qt3DCore.QComponent([parent=None])
param parent

PySide2.Qt3DCore.QNode

Constructs a new QComponent instance with parent as the parent.

Note

a QComponent should never be instanced directly, instance one of the subclasses instead.

PySide2.Qt3DCore.QComponent.addedToEntity(entity)
Parameters

entityPySide2.Qt3DCore.QEntity

PySide2.Qt3DCore.QComponent.entities()
Return type

Returns a QVector containing all the entities that reference this component.

PySide2.Qt3DCore.QComponent.isShareable()
Return type

bool

Holds the shareable flag of the QComponent . The QComponent can be shared across several entities if true .

PySide2.Qt3DCore.QComponent.removedFromEntity(entity)
Parameters

entityPySide2.Qt3DCore.QEntity

PySide2.Qt3DCore.QComponent.setShareable(isShareable)
Parameters

isShareable – bool

Holds the shareable flag of the QComponent . The QComponent can be shared across several entities if true .

PySide2.Qt3DCore.QComponent.shareableChanged(isShareable)
Parameters

isShareable – bool