如何在TreeView中更改指示器的颜色?我尝试使用分支委托
style: TreeViewStyle
{
branchDelegate: {
color: "red"
}
}
考虑到source code为基础,解决方案如下:
style: TreeViewStyle {
branchDelegate: Item {
width: indentation
height: 16
Text {
visible: styleData.column === 0 && styleData.hasChildren
text: styleData.isExpanded ? "\u25bc" : "\u25b6"
color: "red" //!control.activeFocus || styleData.selected ? styleData.textColor : "#666"
font.pointSize: 10
renderType: Text.NativeRendering
style: Text.PlainText
anchors.centerIn: parent
anchors.verticalCenterOffset: 2
}
}
}