Qt 6.11 is out! See what's new in the release
blog
HorizontalHeaderViewDelegate overflows cells
-
It seems the
HorizontalHeaderViewDelegateoverflows the cell content when its content width is greater than its width. I noticed that no implementation^1 of the component has setelideor similar. I can work around this issue by overridingcontentItemlike so:HorizontalHeaderView { delegate: HorizontalHeaderViewDelegate { contentItem: Label { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: model[TableView.view.textRole] elide: Text.ElideRight } } }The main issue with this solution is it's not compatible with switching themes. Am I just using the header delegates wrong? Should I make sure my column never has a width less its header content width?