class QNode

QNode is the base class of all Qt3D node classes used to build a Qt3D scene. More

Inheritance diagram of PySide6.Qt3DCore.Qt3DCore.QNode

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, QDebugOverlay, 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, QCallbackMapping, QAbstractAnimationClip, QAnimationClipLoader, QAnimationClip

Synopsis

Properties

Methods

Slots

Signals

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

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property 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:
property parentᅟ: 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:
__init__([parent=None])
Parameters:

parentQNode

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

setParent()

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

notificationsBlocked()

childNodes()
Return type:

.list of Qt3DCore.QNode

Returns a list filled with the QNode children of the current QNode instance.

enabledChanged(enabled)
Parameters:

enabled – bool

Notification signal of property enabledᅟ .

id()
Return type:

QNodeId

Returns the id that uniquely identifies the QNode instance.

isEnabled()
Return type:

bool

Getter of property enabledᅟ .

nodeDestroyed()

Emitted when the node is destroyed.

notificationsBlocked()
Return type:

bool

Returns true if aspect notifications are blocked; otherwise returns false. By default, notifications are not blocked.

See also

blockNotifications()

parentChanged(parent)
Parameters:

parentQObject

Notification signal of property parentᅟ .

parentNode()
Return type:

QNode

Getter of property parentᅟ .

setEnabled(isEnabled)
Parameters:

isEnabled – bool

See also

isEnabled()

Setter of property enabledᅟ .

setParent(parent)
Parameters:

parentQNode

Setter of property parentᅟ .