Use rowHeightProvider for proper row sizing
TreeView (inherits TableView) defaults to fixed row heights. Setting rowHeightProvider to return -1 tells it to use each delegate's implicitHeight, enabling variable-height rows.
This commit is contained in:
parent
b0a4956d8f
commit
04425d9e9f
|
|
@ -10,6 +10,9 @@ TreeView {
|
|||
id: tree
|
||||
clip: true
|
||||
|
||||
// Force TreeView to calculate row heights per-row instead of using a fixed height
|
||||
rowHeightProvider: function(row) { return -1 } // -1 means "use delegate's implicitHeight"
|
||||
|
||||
readonly property int rowPad: 6
|
||||
readonly property int baseFontSize: theme.fontSize > 0 ? theme.fontSize : 12
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue