<?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 to force repaint on QTreeView when using setIndexWidget()]]></title><description><![CDATA[<p dir="auto">Hey</p>
<p dir="auto">I'm having this issue -&gt;</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/d7eeaffe-99e4-497d-9003-098278ce95f0.gif" alt="2021_01_11---14-43-55_capture_1189.gif" class=" img-fluid img-markdown" /></p>
<p dir="auto">When I click, the selection does not appear "instantly" instead its being painted at "random". I'm left clicking, so the previous item should be deselected...</p>
<p dir="auto">The cause of it oculd be the fact that I use <code>setIndexWidget()</code> And I have a few QWidgets on each item that may conflict with some paiting logic...<br />
I was wondering if there is a way to set a repaint mode. I take now its "smart" and only repaints selected item - widget area, and skips the area outside the treeItem. Any way to set paint update methof on treeView from smart/partial to full tree repaint?</p>
<p dir="auto">TIA</p>
]]></description><link>https://forum.qt.io/topic/122587/how-to-force-repaint-on-qtreeview-when-using-setindexwidget</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 01:11:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/122587.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Jan 2021 14:46:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to force repaint on QTreeView when using setIndexWidget() on Mon, 11 Jan 2021 18:06:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> Yup. I'll make a portable text example and post a code. Just need to get some spare time for it. brb</p>
]]></description><link>https://forum.qt.io/post/637293</link><guid isPermaLink="true">https://forum.qt.io/post/637293</guid><dc:creator><![CDATA[Dariusz]]></dc:creator><pubDate>Mon, 11 Jan 2021 18:06:54 GMT</pubDate></item><item><title><![CDATA[Reply to How to force repaint on QTreeView when using setIndexWidget() on Mon, 11 Jan 2021 16:02:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Not sure what is going on.<br />
Docs says autoFillBackground  should be set to true as not to show both the cell and the widget floating above.<br />
The widget does not replace the item.</p>
<p dir="auto"><a href="https://doc.qt.io/qt-5/qabstractitemview.html#setIndexWidget" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qabstractitemview.html#setIndexWidget</a></p>
<p dir="auto">So you used<br />
setAttribute(Qt::WA_TranslucentBackground); ?</p>
<p dir="auto">on the widgets ?</p>
]]></description><link>https://forum.qt.io/post/637269</link><guid isPermaLink="true">https://forum.qt.io/post/637269</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 11 Jan 2021 16:02:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to force repaint on QTreeView when using setIndexWidget() on Mon, 11 Jan 2021 15:48:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> As far as I remember, the widgets is to the right of the drop down/icon location of tree item. So I can see tree item underneath. I also made QWidget transparent using wa_transparent flag/option if I remember correctly. The are behind widget paints properly/updates. But the outer area where there is drop down icon/checkbox/icon is lagging. Its as if widgets took over the repain call &amp; forgot to forward it to item that is replacing...</p>
]]></description><link>https://forum.qt.io/post/637265</link><guid isPermaLink="true">https://forum.qt.io/post/637265</guid><dc:creator><![CDATA[Dariusz]]></dc:creator><pubDate>Mon, 11 Jan 2021 15:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to How to force repaint on QTreeView when using setIndexWidget() on Mon, 11 Jan 2021 15:35:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
How do you make the widgets be selected ?<br />
Some stylesheet ?<br />
setIndexWidget() floats the widgets on top of the cell so they normally dont react to cell being selected<br />
versus cell have focus.</p>
<p dir="auto">As far as I know, there is no repaint modes.</p>
]]></description><link>https://forum.qt.io/post/637261</link><guid isPermaLink="true">https://forum.qt.io/post/637261</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 11 Jan 2021 15:35:37 GMT</pubDate></item></channel></rss>