- class 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#
Methods#
def
__init__()
def
childNodes()
def
id()
def
isEnabled()
def
parentNode()
Slots#
def
setEnabled()
def
setParent()
Signals#
def
enabledChanged()
def
nodeDestroyed()
def
parentChanged()
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, aQNode
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 anotherQNode
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 aQNode
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:
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 currentQNode
instance was removed from the scene.- Access functions:
- __init__([parent=None])#
- Parameters:
parent –
QNode
Creates a new
QNode
instance with parentparent
.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
istrue
, property change notifications sent by this object to aspects are blocked. Ifblock
isfalse
, 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 currentQNode
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 returnsfalse
. By default, notifications are not blocked.See also
blockNotifications()
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:
parent –
QNode
Setter of property
parentᅟ
.