QSGOpacityNode Class▲
-
Header: QSGOpacityNode
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
-
qmake: QT += quick
-
Inherits: QSGNode
-
Group: QSGOpacityNode is part of Qt Quick Scene Graph Node classes
Detailed Description▲
Opacity applies to its subtree and can be nested. Multiple opacity nodes will be accumulated by multiplying their opacity. The accumulation happens as part of the rendering.
When nested opacity gets below a certain threshold, the subtree might be marked as blocked, causing isSubtreeBlocked() to return true. This is done for performance reasons.
All classes with QSG prefix should be used solely on the scene graph's rendering thread. See Scene Graph and Rendering for more information.
Member Function Documentation▲
QSGOpacityNode::QSGOpacityNode()▲
Constructs an opacity node with a default opacity of 1.
Opacity accumulates downwards in the scene graph so a node with two QSGOpacityNode instances above it, both with opacity of 0.5, will have effective opacity of 0.25.
The default opacity of nodes is 1.
[override virtual] QSGOpacityNode::~QSGOpacityNode()▲
Deletes the opacity node.