Qt3DCore.QNode

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

Inheritance diagram of PySide2.Qt3DCore.Qt3DCore.QNode

Inherited by: Qt3DAnimation.QAbstractAnimationClip, Qt3DAnimation.QAbstractClipAnimator, Qt3DAnimation.QAbstractClipBlendNode, Qt3DAnimation.QAdditiveClipBlend, Qt3DAnimation.QBlendedClipAnimator, Qt3DAnimation.QClipAnimator, Qt3DAnimation.QLerpClipBlend, Qt3DCore.QAbstractSkeleton, Qt3DCore.QArmature, Qt3DCore.QComponent, Qt3DCore.QEntity, Qt3DCore.QJoint, Qt3DCore.QSkeleton, Qt3DCore.QSkeletonLoader, Qt3DCore.QTransform, Qt3DExtras.QAbstractCameraController, Qt3DExtras.QAbstractSpriteSheet, Qt3DExtras.QConeGeometry, Qt3DExtras.QConeMesh, Qt3DExtras.QCuboidGeometry, Qt3DExtras.QCuboidMesh, Qt3DExtras.QCylinderGeometry, Qt3DExtras.QCylinderMesh, Qt3DExtras.QDiffuseMapMaterial, Qt3DExtras.QDiffuseSpecularMapMaterial, Qt3DExtras.QDiffuseSpecularMaterial, Qt3DExtras.QExtrudedTextGeometry, Qt3DExtras.QExtrudedTextMesh, Qt3DExtras.QFirstPersonCameraController, Qt3DExtras.QForwardRenderer, Qt3DExtras.QGoochMaterial, Qt3DExtras.QMetalRoughMaterial, Qt3DExtras.QMorphPhongMaterial, Qt3DExtras.QNormalDiffuseMapMaterial, Qt3DExtras.QNormalDiffuseSpecularMapMaterial, Qt3DExtras.QOrbitCameraController, Qt3DExtras.QPerVertexColorMaterial, Qt3DExtras.QPhongAlphaMaterial, Qt3DExtras.QPhongMaterial, Qt3DExtras.QPlaneGeometry, Qt3DExtras.QPlaneMesh, Qt3DExtras.QSkyboxEntity, Qt3DExtras.QSphereGeometry, Qt3DExtras.QSphereMesh, Qt3DExtras.QSpriteGrid, Qt3DExtras.QSpriteSheet, Qt3DExtras.QSpriteSheetItem, Qt3DExtras.QText2DEntity, Qt3DExtras.QTextureMaterial, Qt3DExtras.QTorusGeometry, Qt3DExtras.QTorusMesh, Qt3DInput.QAbstractActionInput, Qt3DInput.QAbstractAxisInput, Qt3DInput.QAbstractPhysicalDevice, Qt3DInput.QAction, Qt3DInput.QActionInput, Qt3DInput.QAnalogAxisInput, Qt3DInput.QAxis, Qt3DInput.QAxisAccumulator, Qt3DInput.QAxisSetting, Qt3DInput.QButtonAxisInput, Qt3DInput.QInputChord, Qt3DInput.QInputSequence, Qt3DInput.QInputSettings, Qt3DInput.QKeyboardDevice, Qt3DInput.QKeyboardHandler, Qt3DInput.QLogicalDevice, Qt3DInput.QMouseDevice, Qt3DInput.QMouseHandler, Qt3DLogic.QFrameAction, Qt3DRender.QAbstractLight, Qt3DRender.QAbstractRayCaster, Qt3DRender.QAbstractTexture, Qt3DRender.QAbstractTextureImage, Qt3DRender.QAlphaCoverage, Qt3DRender.QAlphaTest, Qt3DRender.QAttribute, Qt3DRender.QBlendEquation, Qt3DRender.QBlendEquationArguments, Qt3DRender.QBlitFramebuffer, Qt3DRender.QBuffer, Qt3DRender.QBufferCapture, Qt3DRender.QCamera, Qt3DRender.QCameraLens, Qt3DRender.QCameraSelector, Qt3DRender.QClearBuffers, Qt3DRender.QClipPlane, Qt3DRender.QColorMask, Qt3DRender.QComputeCommand, Qt3DRender.QCullFace, Qt3DRender.QDepthTest, Qt3DRender.QDirectionalLight, Qt3DRender.QDispatchCompute, Qt3DRender.QDithering, Qt3DRender.QEffect, Qt3DRender.QEnvironmentLight, Qt3DRender.QFilterKey, Qt3DRender.QFrameGraphNode, Qt3DRender.QFrontFace, Qt3DRender.QFrustumCulling, Qt3DRender.QGeometry, Qt3DRender.QGeometryRenderer, Qt3DRender.QLayer, Qt3DRender.QLayerFilter, Qt3DRender.QLevelOfDetail, Qt3DRender.QLevelOfDetailSwitch, Qt3DRender.QLineWidth, Qt3DRender.QMaterial, Qt3DRender.QMemoryBarrier, Qt3DRender.QMesh, Qt3DRender.QMultiSampleAntiAliasing, Qt3DRender.QNoDepthMask, Qt3DRender.QNoDraw, Qt3DRender.QObjectPicker, Qt3DRender.QPaintedTextureImage, Qt3DRender.QParameter, Qt3DRender.QPickingSettings, Qt3DRender.QPointLight, Qt3DRender.QPointSize, Qt3DRender.QPolygonOffset, Qt3DRender.QProximityFilter, Qt3DRender.QRayCaster, Qt3DRender.QRenderCapture, Qt3DRender.QRenderPass, Qt3DRender.QRenderPassFilter, Qt3DRender.QRenderSettings, Qt3DRender.QRenderState, Qt3DRender.QRenderStateSet, Qt3DRender.QRenderSurfaceSelector, Qt3DRender.QRenderTarget, Qt3DRender.QRenderTargetOutput, Qt3DRender.QRenderTargetSelector, Qt3DRender.QSceneLoader, Qt3DRender.QScissorTest, Qt3DRender.QScreenRayCaster, Qt3DRender.QSeamlessCubemap, Qt3DRender.QShaderData, Qt3DRender.QShaderProgram, Qt3DRender.QShaderProgramBuilder, Qt3DRender.QSortPolicy, Qt3DRender.QSpotLight, Qt3DRender.QStencilMask, Qt3DRender.QStencilOperation, Qt3DRender.QStencilTest, Qt3DRender.QTechnique, Qt3DRender.QTechniqueFilter, Qt3DRender.QTexture1D, Qt3DRender.QTexture1DArray, Qt3DRender.QTexture2D, Qt3DRender.QTexture2DArray, Qt3DRender.QTexture2DMultisample, Qt3DRender.QTexture2DMultisampleArray, Qt3DRender.QTexture3D, Qt3DRender.QTextureBuffer, Qt3DRender.QTextureCubeMap, Qt3DRender.QTextureCubeMapArray, Qt3DRender.QTextureImage, Qt3DRender.QTextureLoader, Qt3DRender.QTextureRectangle, Qt3DRender.QViewport

Synopsis

Functions

Virtual functions

Slots

Signals

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 PySide2.Qt3DCore.Qt3DCore.QNode([parent=None])
param parent

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

setParent()

PySide2.Qt3DCore.Qt3DCore.QNode.PropertyTrackingMode

Indicates how a QNode listens for property updates.

Constant

Description

Qt3DCore.QNode.TrackFinalValues

Tracks final values

Qt3DCore.QNode.DontTrackValues

Does not track values

Qt3DCore.QNode.TrackAllValues

Tracks all values

PySide2.Qt3DCore.Qt3DCore.QNode.blockNotifications(block)
Parameters

blockbool

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()

PySide2.Qt3DCore.Qt3DCore.QNode.childNodes()
Return type

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

PySide2.Qt3DCore.Qt3DCore.QNode.clearPropertyTracking(propertyName)
Parameters

propertyName – unicode

Clears the tracking property called propertyName .

PySide2.Qt3DCore.Qt3DCore.QNode.clearPropertyTrackings()

Erases all values that have been saved by the property tracking.

PySide2.Qt3DCore.Qt3DCore.QNode.defaultPropertyTrackingMode()
Return type

PropertyTrackingMode

Returns the default property tracking mode which determines whether a QNode should be listening for property updates.

See also

setDefaultPropertyTrackingMode()

PySide2.Qt3DCore.Qt3DCore.QNode.defaultPropertyTrackingModeChanged(mode)
Parameters

modePropertyTrackingMode

PySide2.Qt3DCore.Qt3DCore.QNode.enabledChanged(enabled)
Parameters

enabledbool

PySide2.Qt3DCore.Qt3DCore.QNode.id()
Return type

QNodeId

Returns the id that uniquely identifies the QNode instance.

PySide2.Qt3DCore.Qt3DCore.QNode.isEnabled()
Return type

bool

PySide2.Qt3DCore.Qt3DCore.QNode.nodeDestroyed()
PySide2.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

blockNotifications()

PySide2.Qt3DCore.Qt3DCore.QNode.notifyObservers(change)
Parameters

changeQSharedPointer

Sends the change QSceneChangePtr to any QBackendNodes in the registered aspects that correspond to this QNode .

For the common case of a QObject property change, QNode handles this for you automatically by sending a QPropertyUpdatedChange event to the backend nodes. You only need to call this function if you wish to send a specific type of change in place of the automatic handling.

PySide2.Qt3DCore.Qt3DCore.QNode.parentChanged(parent)
Parameters

parentQObject

PySide2.Qt3DCore.Qt3DCore.QNode.parentNode()
Return type

QNode

PySide2.Qt3DCore.Qt3DCore.QNode.propertyTracking(propertyName)
Parameters

propertyName – unicode

Return type

PropertyTrackingMode

Returns the tracking mode of propertyName .

See also

setPropertyTracking()

PySide2.Qt3DCore.Qt3DCore.QNode.sceneChangeEvent(change)
Parameters

changeQSharedPointer

Called when one or more backend aspects sends a notification change to the current QNode instance.

Note

This method should be reimplemented in your subclasses to properly handle the change .

PySide2.Qt3DCore.Qt3DCore.QNode.sendReply(command)
Parameters

commandQSharedPointer

Send a command back to the backend node.

Assumes the command is to be to sent back in reply to itself to the backend node.

See also

QNodeCommand sendCommand

PySide2.Qt3DCore.Qt3DCore.QNode.setDefaultPropertyTrackingMode(mode)
Parameters

modePropertyTrackingMode

See also

defaultPropertyTrackingMode()

PySide2.Qt3DCore.Qt3DCore.QNode.setEnabled(isEnabled)
Parameters

isEnabledbool

See also

isEnabled()

PySide2.Qt3DCore.Qt3DCore.QNode.setParent(parent)
Parameters

parentQNode

PySide2.Qt3DCore.Qt3DCore.QNode.setPropertyTracking(propertyName, trackMode)
Parameters

Sets the property tracking for propertyName and trackMode .

See also

propertyTracking()