ProjectTree: Add per-node "Expand" and "Collapse" actions

Change-Id: Ic722598f7bb2665ac7a09c24b7eefa9dc6787808
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-12-19 15:45:24 +01:00
parent 5ef320d9fc
commit a5785e678e
5 changed files with 58 additions and 3 deletions

View File

@@ -430,6 +430,16 @@ void ProjectTreeWidget::setAutoSynchronization(bool sync)
syncFromDocumentManager();
}
void ProjectTreeWidget::collapseCurrentNode()
{
m_view->collapse(m_view->currentIndex());
}
void ProjectTreeWidget::expandCurrentNode()
{
m_view->expand(m_view->currentIndex());
}
void ProjectTreeWidget::collapseAll()
{
m_view->collapseAll();