Element representing a tree branch for showing a tree node in a list view.
This element may, for instance, be used in the delegate of a html.ListView with a core.TreeModelAdapter as model for adding a tree view UI.
Example:
ListView {
fill: true
model: treeModel
cellWidth: bboxWidth
cellHeight: theme.itemHeightSmall
delegate: template Box {
layout: "center-row"
TreeBranch {
fillHeight: true
level: modelData.value.level
nodeStatus: modelData.value.nodeStatus
nodeType: modelData.value.nodeType
}
Label {
marginLeft: theme.paddingSmall
text: modelData.value.text
}
}
}
Properties:
Name | Type | Description |
---|---|---|
branchLines |
bool | (default: |
branchLinesColor |
core.Color | (default: |
collapsedIcon |
string | (default: |
iconColor |
core.Color | (default: |
leafIcon |
string | (default: |
level |
number | (default: |
nodeStatus |
object | (default: |
nodeType |
string | (default: |
uncollapsedIcon |
string | (default: |
Extends
Events
-
Is triggered when the user clicked the collapse/uncollapse button.
Name Type Description event
html.MouseBox.PointerEvent The pointer event of the click.