-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.1
-
None
When calling TreeView::expand(row) on a row that doesn't have any children, the following happens:
1. TreeView delegate required property "expanded" is set to "true"
2. If you call TreeView::isExpanded(row) aftwerwards, it's "false". This is because QQmlTreeModelToTableModel::expandRow(row) doesn't update the property if the item has no children.
This behaviour is inconsistent. The preferred way would be to allow marking a row as expanded even when there are no children. In our use case, we fetch children only after the user tries to expand the parent item, so we can't differentiate between "expandable" and "non-expandable" items. The user should be able to expand even a potentially empty item and get feedback that it's empty.