<?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[QTableView and double buffering?]]></title><description><![CDATA[<p dir="auto">I was under the impression that QWidgets (ergo QTableView) would use double buffering to avoid having to do expensive redraws.</p>
<p dir="auto">but i find it calling paint events when i'm just browsing the menu bar (windows)<br />
or even just hovering the mouse (there are no mouseover calls, so no bits are changing, yet it is continuously redrawing items in the table)</p>
<p dir="auto">how can i make it stop?</p>
]]></description><link>https://forum.qt.io/topic/131448/qtableview-and-double-buffering</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 14:04:40 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/131448.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Oct 2021 23:46:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QTableView and double buffering? on Thu, 28 Oct 2021 16:27:11 GMT]]></title><description><![CDATA[<p dir="auto">it's possible further updates are triggered, though it's certainly not supposed to do that. i'll investigate that.<br />
yes there are item delegates involved.<br />
not sure what you're asking with "what is your model doing".  it's an SQLite table.<br />
i'm not able to simply replace what i'm doing with a QStandardItemModel, that would take weeks of work.<br />
thanks for the ideas.</p>
<p dir="auto">but doesn't it seem strange that simply BROWSING THE MENU BAR would cause paint events instead of blit-from-double-buffer?  also: only when the table has focus. if another view has focus, no paint events are triggered, even when the menus overlap the same areas.</p>
]]></description><link>https://forum.qt.io/post/687232</link><guid isPermaLink="true">https://forum.qt.io/post/687232</guid><dc:creator><![CDATA[davecotter]]></dc:creator><pubDate>Thu, 28 Oct 2021 16:27:11 GMT</pubDate></item><item><title><![CDATA[Reply to QTableView and double buffering? on Thu, 28 Oct 2021 02:36:38 GMT]]></title><description><![CDATA[<p dir="auto">The <a href="https://doc.qt.io/qt-5/qwidget.html#transparency-and-double-buffering" target="_blank" rel="noopener noreferrer nofollow ugc">manual</a> says that double-buffering is on by default.  I guess standard QTableView could be doing something that defeats the caching: not seen this myself.</p>
<p dir="auto">The fact that you have overloaded the view's paintEvent() (or you would not be seeing this) makes it possible there's something odd you are doing.  Is your overload accidentally triggering further updates?  Are there delegates involved?</p>
<p dir="auto">It's also possible the underlying model may be doing something odd, triggering frequent update() calls.<br />
What is your model doing?  Does the behaviour persist if you put a static QStandardItemModel in the view?</p>
]]></description><link>https://forum.qt.io/post/687090</link><guid isPermaLink="true">https://forum.qt.io/post/687090</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Thu, 28 Oct 2021 02:36:38 GMT</pubDate></item><item><title><![CDATA[Reply to QTableView and double buffering? on Wed, 27 Oct 2021 19:36:49 GMT]]></title><description><![CDATA[<p dir="auto">is there a bit i can flip that says "please doublebuffer this" so redraws (no model changes) can blit from the buffer and not ask all the widgets to do their (very expensive) drawing?</p>
]]></description><link>https://forum.qt.io/post/687070</link><guid isPermaLink="true">https://forum.qt.io/post/687070</guid><dc:creator><![CDATA[davecotter]]></dc:creator><pubDate>Wed, 27 Oct 2021 19:36:49 GMT</pubDate></item><item><title><![CDATA[Reply to QTableView and double buffering? on Thu, 28 Oct 2021 17:02:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto"><s>AFAIR no the raster engine does not.</s> Update calls are compressed though.</p>
<p dir="auto"><em>[edit: mixed double buffering with a different technique SGaist]</em></p>
]]></description><link>https://forum.qt.io/post/687054</link><guid isPermaLink="true">https://forum.qt.io/post/687054</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 28 Oct 2021 17:02:55 GMT</pubDate></item><item><title><![CDATA[Reply to QTableView and double buffering? on Wed, 27 Oct 2021 16:16:06 GMT]]></title><description><![CDATA[<p dir="auto">that is unrelated to double buffering</p>
]]></description><link>https://forum.qt.io/post/687035</link><guid isPermaLink="true">https://forum.qt.io/post/687035</guid><dc:creator><![CDATA[davecotter]]></dc:creator><pubDate>Wed, 27 Oct 2021 16:16:06 GMT</pubDate></item><item><title><![CDATA[Reply to QTableView and double buffering? on Wed, 27 Oct 2021 10:04:58 GMT]]></title><description><![CDATA[<p dir="auto">Qwidget::setUpdatesEnabled(bool enable) ?</p>
]]></description><link>https://forum.qt.io/post/686953</link><guid isPermaLink="true">https://forum.qt.io/post/686953</guid><dc:creator><![CDATA[mpergand]]></dc:creator><pubDate>Wed, 27 Oct 2021 10:04:58 GMT</pubDate></item></channel></rss>