removeChildNode added

This commit is contained in:
Uwe Rathmann 2022-06-13 13:09:49 +02:00
parent da21b95eb3
commit ff76f1ecfa
2 changed files with 12 additions and 0 deletions

View File

@ -100,6 +100,17 @@ QSGNode* QskSGNode::findChildNode( QSGNode* parent, quint8 role )
return nullptr;
}
bool QskSGNode::removeChildNode( QSGNode* parent, quint8 role )
{
if ( auto node = findChildNode( parent, role ) )
{
qskRemoveChildNode( parent, node );
return true;
}
return false;
}
void QskSGNode::removeAllChildNodesAfter( QSGNode* parent, QSGNode* child )
{
if ( parent && child && child->parent() == parent )

View File

@ -43,6 +43,7 @@ namespace QskSGNode
}
QSK_EXPORT QSGNode* findChildNode( QSGNode* parent, quint8 role );
QSK_EXPORT bool removeChildNode( QSGNode* parent, quint8 role );
// nodeRoles: sort order
QSK_EXPORT void replaceChildNode(