<?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[How do I remove header labels from my tree view?]]></title><description><![CDATA[<p dir="auto">If you just set the header labels with  "model.setHorizontalHeaderLabels", it will still keep the old labels if the list of new labels is shorter than the previous labels. For example:</p>
<pre><code>        self.setHorizontalHeaderLabels(["test", "test2"])
        self.setHorizontalHeaderLabels(["test3"])
</code></pre>
<p dir="auto">After running this code in my item model, the header looks like this:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/8653b616-2a0d-4228-b4ee-6b471e402222.png" alt="cd71cad2-1eeb-4b06-b2f3-5185f8ac10d6-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Clearly "test" was overwritten, but test2 stays. How can I remove test2? There are no items that go in its column.</p>
]]></description><link>https://forum.qt.io/topic/145949/how-do-i-remove-header-labels-from-my-tree-view</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 03:11:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145949.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Jun 2023 18:56:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I remove header labels from my tree view? on Thu, 22 Jun 2023 18:58:05 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Use an empty string for that column.</p>
]]></description><link>https://forum.qt.io/post/762369</link><guid isPermaLink="true">https://forum.qt.io/post/762369</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 22 Jun 2023 18:58:05 GMT</pubDate></item></channel></rss>