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

Inherited by: QAbstractAnimationClip, QAbstractChannelMapping, QAbstractClipAnimator, QAbstractClipBlendNode, QAdditiveClipBlend, QAnimationClip, QAnimationClipLoader, QBlendedClipAnimator, QClipAnimator, QClock, QLerpClipBlend, QSkeletonMapping, QAbstractSkeleton, QArmature, QComponent, QEntity, QJoint, QSkeleton, QSkeletonLoader, QTransform, QAbstractCameraController, QAbstractSpriteSheet, QConeGeometry, QConeMesh, QCuboidGeometry, QCuboidMesh, QCylinderGeometry, QCylinderMesh, QDiffuseMapMaterial, QDiffuseSpecularMapMaterial, QDiffuseSpecularMaterial, QExtrudedTextGeometry, QExtrudedTextMesh, QFirstPersonCameraController, QForwardRenderer, QGoochMaterial, QMetalRoughMaterial, QMorphPhongMaterial, QNormalDiffuseMapAlphaMaterial, QNormalDiffuseMapMaterial, QNormalDiffuseSpecularMapMaterial, QOrbitCameraController, QPerVertexColorMaterial, QPhongAlphaMaterial, QPhongMaterial, QPlaneGeometry, QPlaneMesh, QSkyboxEntity, QSphereGeometry, QSphereMesh, QSpriteGrid, QSpriteSheet, QSpriteSheetItem, QText2DEntity, QTextureMaterial, QTorusGeometry, QTorusMesh, QAbstractActionInput, QAbstractAxisInput, QAbstractPhysicalDevice, QAction, QActionInput, QAnalogAxisInput, QAxis, QAxisAccumulator, QAxisSetting, QButtonAxisInput, QInputChord, QInputSequence, QInputSettings, QKeyboardDevice, QKeyboardHandler, QLogicalDevice, QMouseDevice, QMouseHandler, QFrameAction, QAbstractLight, QAbstractRayCaster, QAbstractTexture, QAbstractTextureImage, QAlphaCoverage, QAlphaTest, QAttribute, QBlendEquation, QBlendEquationArguments, QBlitFramebuffer, QBuffer, QBufferCapture, QCamera, QCameraLens, QCameraSelector, QClearBuffers, QClipPlane, QColorMask, QComputeCommand, QCullFace, QDepthTest, QDirectionalLight, QDispatchCompute, QDithering, QEffect, QEnvironmentLight, QFilterKey, QFrameGraphNode, QFrontFace, QFrustumCulling, QGeometry, QGeometryRenderer, QLayer, QLayerFilter, QLevelOfDetail, QLevelOfDetailSwitch, QLineWidth, QMaterial, QMemoryBarrier, QMesh, QMultiSampleAntiAliasing, QNoDepthMask, QNoDraw, QNoPicking, QObjectPicker, QPaintedTextureImage, QParameter, QPickingSettings, QPointLight, QPointSize, QPolygonOffset, QProximityFilter, QRayCaster, QRenderCapture, QRenderPass, QRenderPassFilter, QRenderSettings, QRenderState, QRenderStateSet, QRenderSurfaceSelector, QRenderTarget, QRenderTargetOutput, QRenderTargetSelector, QSceneLoader, QScissorTest, QScreenRayCaster, QSeamlessCubemap, QSetFence, QShaderData, QShaderImage, QShaderProgram, QShaderProgramBuilder, QSharedGLTexture, QSortPolicy, QSpotLight, QStencilMask, QStencilOperation, QStencilTest, QTechnique, QTechniqueFilter, QTexture1D, QTexture1DArray, QTexture2D, QTexture2DArray, QTexture2DMultisample, QTexture2DMultisampleArray, QTexture3D, QTextureBuffer, QTextureCubeMap, QTextureCubeMapArray, QTextureImage, QTextureLoader, QTextureRectangle, QViewport, QWaitFence
Synopsis¶
Functions¶
def
blockNotifications(block)def
childNodes()def
clearPropertyTracking(propertyName)def
clearPropertyTrackings()def
defaultPropertyTrackingMode()def
id()def
isEnabled()def
notificationsBlocked()def
notifyObservers(change)def
parentNode()def
propertyTracking(propertyName)def
sendReply(command)def
setPropertyTracking(propertyName, trackMode)
Virtual functions¶
def
sceneChangeEvent(change)
Slots¶
def
setDefaultPropertyTrackingMode(mode)def
setEnabled(isEnabled)def
setParent(parent)
Signals¶
def
defaultPropertyTrackingModeChanged(mode)def
enabledChanged(enabled)def
nodeDestroyed()def
parentChanged(parent)
Detailed Description¶
The owernship of
QNodeis determined by theQObjectparent/child relationship between nodes. By itself, aQNodehas no visual appearance and no particular meaning, it is there as a way of building a node based tree structure.The parent of a
QNodeinstance can only be anotherQNodeinstance.Each
QNodeinstance has a unique id that allows it to be recognizable from other instances.When properties are defined on a
QNodesubclass, their NOTIFY signal will automatically generate notifications that the Qt3D backend aspects will receive.See also
QEntityQComponent
- class PySide2.Qt3DCore.Qt3DCore.QNode([parent=None])¶
- param parent:
Creates a new
QNodeinstance with parentparent.Note
The backend aspects will be notified that a
QNodeinstance is part of the scene only if it has a parent; unless this is the root node of the Qt3D scene.See also
- PySide2.Qt3DCore.Qt3DCore.QNode.PropertyTrackingMode¶
Indicates how a
QNodelistens 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:
block – bool
- Return type:
bool
If
blockistrue, property change notifications sent by this object to aspects are blocked. Ifblockisfalse, 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
- PySide2.Qt3DCore.Qt3DCore.QNode.childNodes()¶
- Return type:
Returns a list filled with the
QNodechildren of the currentQNodeinstance.
- PySide2.Qt3DCore.Qt3DCore.QNode.clearPropertyTracking(propertyName)¶
- Parameters:
propertyName – str
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:
Holds the default property tracking mode which determines whether a
QNodeshould be listening for property updates. This only applies to properties which haven’t been overridden by a call tosetPropertyTracking.By default it is set to
TrackFinalValues
- PySide2.Qt3DCore.Qt3DCore.QNode.defaultPropertyTrackingModeChanged(mode)¶
- Parameters:
mode –
PropertyTrackingMode
- PySide2.Qt3DCore.Qt3DCore.QNode.enabledChanged(enabled)¶
- Parameters:
enabled – bool
- PySide2.Qt3DCore.Qt3DCore.QNode.id()¶
- Return type:
Returns the id that uniquely identifies the
QNodeinstance.
- PySide2.Qt3DCore.Qt3DCore.QNode.isEnabled()¶
- Return type:
bool
Holds the
QNodeenabled flag. By default aQNodeis 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.
- PySide2.Qt3DCore.Qt3DCore.QNode.nodeDestroyed()¶
- PySide2.Qt3DCore.Qt3DCore.QNode.notificationsBlocked()¶
- Return type:
bool
Returns
trueif aspect notifications are blocked; otherwise returnsfalse. By default, notifications are not blocked.See also
- PySide2.Qt3DCore.Qt3DCore.QNode.notifyObservers(change)¶
- Parameters:
change –
QSharedPointer
Note
This function is deprecated.
Sends the
changeQSceneChangePtrto any QBackendNodes in the registered aspects that correspond to thisQNode.You only need to call this function if you wish to send a specific type of change in place of the automatic handling.
Note: as of Qt 5.14, change messages are deprecated and should not be used, in particular for properties.
- PySide2.Qt3DCore.Qt3DCore.QNode.parentChanged(parent)¶
- Parameters:
parent –
PySide2.QtCore.QObject
- PySide2.Qt3DCore.Qt3DCore.QNode.parentNode()¶
- Return type:
Holds the immediate
QNodeparent, or null if the node has no parent.Setting the parent will notify the backend aspects about current
QNodeinstance’s parent change.Note
if
parenthappens to be null, this will actually notify that the currentQNodeinstance was removed from the scene.
- PySide2.Qt3DCore.Qt3DCore.QNode.propertyTracking(propertyName)¶
- Parameters:
propertyName – str
- Return type:
Returns the tracking mode of
propertyName.See also
- PySide2.Qt3DCore.Qt3DCore.QNode.sceneChangeEvent(change)¶
- Parameters:
change –
QSharedPointer
Note
This function is deprecated.
Called when one or more backend aspects sends a notification
changeto the currentQNodeinstance.Note
This method should be reimplemented in your subclasses to properly handle the
change.
- PySide2.Qt3DCore.Qt3DCore.QNode.sendReply(command)¶
- Parameters:
command –
QSharedPointer
Note
This function is deprecated.
Send a
commandback to the backend node.Assumes the command is to be to sent back in reply to itself to the backend node.
See also
QNodeCommandsendCommand
- PySide2.Qt3DCore.Qt3DCore.QNode.setDefaultPropertyTrackingMode(mode)¶
- Parameters:
mode –
PropertyTrackingMode
Holds the default property tracking mode which determines whether a
QNodeshould be listening for property updates. This only applies to properties which haven’t been overridden by a call tosetPropertyTracking.By default it is set to
TrackFinalValues
- PySide2.Qt3DCore.Qt3DCore.QNode.setEnabled(isEnabled)¶
- Parameters:
isEnabled – bool
Holds the
QNodeenabled flag. By default aQNodeis 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.
- PySide2.Qt3DCore.Qt3DCore.QNode.setParent(parent)¶
- Parameters:
parent –
PySide2.Qt3DCore.Qt3DCore.QNode
Holds the immediate
QNodeparent, or null if the node has no parent.Setting the parent will notify the backend aspects about current
QNodeinstance’s parent change.Note
if
parenthappens to be null, this will actually notify that the currentQNodeinstance was removed from the scene.
- PySide2.Qt3DCore.Qt3DCore.QNode.setPropertyTracking(propertyName, trackMode)¶
- Parameters:
propertyName – str
trackMode –
PropertyTrackingMode
Sets the property tracking for
propertyNameandtrackMode.See also
© 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.