<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HorizontalHeaderViewDelegate overflows cells]]></title><description><![CDATA[<p dir="auto">It seems the <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-horizontalheaderviewdelegate.html" target="_blank" rel="noopener noreferrer nofollow ugc"><code>HorizontalHeaderViewDelegate</code></a> overflows the cell content when its content width is greater than its width. I noticed that no implementation<a href="https://github.com/qt/qtdeclarative/blob/cc125dd2ad4348cf006a2792c043a001b5eb93a9/src/quickcontrols/basic/HorizontalHeaderViewDelegate.qml#L27-L32" target="_blank" rel="noopener noreferrer nofollow ugc">^1</a> of the component has set <code>elide</code> or similar. I can work around this issue by overriding <code>contentItem</code> like so:</p>
<pre><code class="language-qml">HorizontalHeaderView {
    delegate: HorizontalHeaderViewDelegate {
        contentItem: Label {
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            text: model[TableView.view.textRole]
            elide: Text.ElideRight
        }
    }
}
</code></pre>
<p dir="auto">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?</p>
]]></description><link>https://forum.qt.io/topic/164510/horizontalheaderviewdelegate-overflows-cells</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 00:12:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164510.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Apr 2026 18:13:43 GMT</pubDate><ttl>60</ttl></channel></rss>