QNode#
QNode
is the base class of all Qt3D node classes used to build a Qt3D scene. More…
Inherited by: QTechnique, QShaderProgramBuilder, QShaderProgram, QShaderImage, QRenderTargetOutput, QRenderState, QStencilTest, QStencilOperation, QStencilMask, QSeamlessCubemap, QScissorTest, QRasterMode, QPolygonOffset, QPointSize, QNoDepthMask, QMultiSampleAntiAliasing, QLineWidth, QFrontFace, QDithering, QDepthTest, QDepthRange, QCullFace, QColorMask, QClipPlane, QBlendEquationArguments, QBlendEquation, QAlphaTest, QAlphaCoverage, QRenderPass, QPickingSettings, QParameter, QFrameGraphNode, QWaitFence, QViewport, QTechniqueFilter, QForwardRenderer, QSubtreeEnabler, QSortPolicy, QSetFence, QRenderTargetSelector, QRenderSurfaceSelector, QRenderStateSet, QRenderPassFilter, QRenderCapture, QProximityFilter, QNoPicking, QNoDraw, QMemoryBarrier, QLayerFilter, QFrustumCulling, QDispatchCompute, QClearBuffers, QCameraSelector, QBufferCapture, QBlitFramebuffer, QFilterKey, QEffect, QAbstractTextureImage, QTextureImage, QPaintedTextureImage, QAbstractTexture, QTextureRectangle, QTextureLoader, QTextureCubeMapArray, QTextureCubeMap, QTextureBuffer, QTexture3D, QTexture2DMultisampleArray, QTexture2DMultisample, QTexture2DArray, QTexture2D, QTexture1DArray, QTexture1D, QSharedGLTexture, QAxisSetting, QAxis, QAction, QAbstractPhysicalDevice, QMouseDevice, QKeyboardDevice, QAbstractAxisInput, QButtonAxisInput, QAnalogAxisInput, QAbstractActionInput, QInputSequence, QInputChord, QActionInput, QSpriteSheetItem, QAbstractSpriteSheet, QSpriteSheet, QSpriteGrid, QJoint, QGeometryView, QTorusGeometryView, QSphereGeometryView, QPlaneGeometryView, QCylinderGeometryView, QCuboidGeometryView, QConeGeometryView, QGeometry, QTorusGeometry, QSphereGeometry, QPlaneGeometry, QExtrudedTextGeometry, QCylinderGeometry, QCuboidGeometry, QConeGeometry, QEntity, QCamera, QText2DEntity, QSkyboxEntity, QAbstractCameraController, QOrbitCameraController, QFirstPersonCameraController, QComponent, 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, QBuffer, QBoundingVolume, QPickingProxy, QGeometryRenderer, QMesh, QTorusMesh, QSphereMesh, QPlaneMesh, QExtrudedTextMesh, QCylinderMesh, QCuboidMesh, QConeMesh, QAttribute, QArmature, QAbstractSkeleton, QSkeletonLoader, QSkeleton, QClock, QChannelMapper, QAbstractClipBlendNode, QLerpClipBlend, QClipBlendValue, QAdditiveClipBlend, QAbstractClipAnimator, QClipAnimator, QBlendedClipAnimator, QAbstractChannelMapping, QSkeletonMapping, QChannelMapping, QAbstractAnimationClip, QAnimationClipLoader, QAnimationClip
Synopsis#
Properties#
Functions#
def
blockNotifications
(block)def
childNodes
()def
id
()def
isEnabled
()def
notificationsBlocked
()def
parentNode
()
Slots#
def
setEnabled
(isEnabled)def
setParent
(parent)
Signals#
def
enabledChanged
(enabled)def
nodeDestroyed
()def
parentChanged
(parent)
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#
The owernship of QNode
is determined by the QObject
parent/child relationship between nodes. By itself, a QNode
has no visual appearance and no particular meaning, it is there as a way of building a node based tree structure.
The parent of a QNode
instance can only be another QNode
instance.
Each QNode
instance has a unique id that allows it to be recognizable from other instances.
When properties are defined on a QNode
subclass, their NOTIFY signal will automatically generate notifications that the Qt3D backend aspects will receive.
See also
QEntity
QComponent
- class PySide6.Qt3DCore.Qt3DCore.QNode([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Creates a new QNode
instance with parent parent
.
Note
The backend aspects will be notified that a QNode
instance is part of the scene only if it has a parent; unless this is the root node of the Qt3D scene.
See also
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DCore.Qt3DCore.QNode.enabled: bool#
Holds the QNode
enabled flag. By default a QNode
is always enabled.
Note
the interpretation of what enabled means is aspect-dependent. Even if enabled is set to false
, some aspects may still consider the node in some manner. This is documented on a class by class basis.
- Access functions:
isEnabled
()setEnabled
(isEnabled)Signal
enabledChanged
(enabled)
- property PᅟySide6.Qt3DCore.Qt3DCore.QNode.parent: PySide6.Qt3DCore.Qt3DCore.QNode#
Holds the immediate QNode
parent, or null if the node has no parent.
Setting the parent will notify the backend aspects about current QNode
instance’s parent change.
Note
if parent
happens to be null, this will actually notify that the current QNode
instance was removed from the scene.
- Access functions:
parentNode
()setParent
(parent)Signal
parentChanged
(parent)
- PySide6.Qt3DCore.Qt3DCore.QNode.blockNotifications(block)#
- Parameters:
block – bool
- Return type:
bool
If block
is true
, property change notifications sent by this object to aspects are blocked. If block
is false
, no such blocking will occur.
The return value is the previous value of notificationsBlocked()
.
Note that the other notification types will be sent even if the notifications for this object have been blocked.
See also
- PySide6.Qt3DCore.Qt3DCore.QNode.childNodes()#
- Return type:
Returns a list filled with the QNode
children of the current QNode
instance.
- PySide6.Qt3DCore.Qt3DCore.QNode.enabledChanged(enabled)#
- Parameters:
enabled – bool
Notification signal of property enabled
.
- PySide6.Qt3DCore.Qt3DCore.QNode.id()#
- Return type:
Returns the id that uniquely identifies the QNode
instance.
- PySide6.Qt3DCore.Qt3DCore.QNode.isEnabled()#
- Return type:
bool
Getter of property enabled
.
- PySide6.Qt3DCore.Qt3DCore.QNode.nodeDestroyed()#
Emitted when the node is destroyed.
- PySide6.Qt3DCore.Qt3DCore.QNode.notificationsBlocked()#
- Return type:
bool
Returns true
if aspect notifications are blocked; otherwise returns false
. By default, notifications are not blocked.
See also
- PySide6.Qt3DCore.Qt3DCore.QNode.parentChanged(parent)#
- Parameters:
parent –
PySide6.QtCore.QObject
Notification signal of property parent
.
- PySide6.Qt3DCore.Qt3DCore.QNode.parentNode()#
- Return type:
Getter of property parent
.
- PySide6.Qt3DCore.Qt3DCore.QNode.setEnabled(isEnabled)#
- Parameters:
isEnabled – bool
See also
Setter of property enabled
.
- PySide6.Qt3DCore.Qt3DCore.QNode.setParent(parent)#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Setter of property parent
.