I found in the doc TreeView doc that you can use onExpanded
to know when a Node
from a TreeView
is expanded
but how can you know when a Node
is closed
?
Code example:
TreeView {
TableViewColumn {
title: "Name"
role: "fileName"
width: 300
}
TableViewColumn {
title: "Permissions"
role: "filePermissions"
width: 100
}
model: fileSystemModel
onExpanded {
console.log("expanded :" + index)
}
}
From the documentation, onCollapsed
is the opposite of onExpanded
, so you can check when that signal is emitted.