Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.1
-
None
Description
when implicitWidth of TreeViewDelegate changes, TreeView will not update automatically.
for example, modify the viewDelegate in the tableofcontents example:
viewDelegate:
onImplicitWidthChanged: {
console.log("implicitWidthChanged")
}
contentItem: Label { id: label x: viewDelegate._padding + (viewDelegate.depth + 1 * viewDelegate.indentation) width: parent.width - viewDelegate._padding - x property bool flag: false TapHandler { onTapped: { console.log("tapped") label.flag = !label.flag } } text: viewDelegate.model.display + (flag ? "extra text" : "") elide: Text.ElideRight }
when tapping on the text, "extra text" will be added and "implicitWidthChanged" will be emitted. However the TreeView needs extra signals to resize, for example toggleExpanded