TableView row height
-
-
But this sets the height for all rows:
TableView { id: tableView anchors.fill: tableArea headerDelegate: headersDel rowDelegate: Rectangle { height: 30 // Height for all columns }
...
}and in your column delegate you can use:
Component { id: iconRowDelegate Image { anchors.fill: parent fillMode: Image.Pad source: "Icon.png" } }
-
@th.thielemann
I don't want to redefine rowDelegate, i want get height from it (since it differs depending on platform and pixel density).
Question become: how to access rowDelegate's height property? -
@p3c0
I get actual height value, but first row in view not draws after that, i don't know why yet.TableView { id: view property int row_height anchors.fill: parent section.delegate: section_delegate Component.onCompleted { currentRow = 0; row_height = ____currentRowItem.height; } } Component { id: section_delegate Rectangle { width: view.width height: view.row_height } }
-
@p3c0
I get actual height value, but first row in view not draws after that, i don't know why yet.TableView { id: view property int row_height anchors.fill: parent section.delegate: section_delegate Component.onCompleted { currentRow = 0; row_height = __currentRowItem.height; } } Component { id: section_delegate Rectangle { width: view.width height: view.row_height } }