<?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[Does it have to call QTableWidget::setItem for every cell?]]></title><description><![CDATA[<p dir="auto">Not quite clear about the usage about QTableWidget. (not in view/model mode)<br />
After <strong>setColumnCount</strong> and <strong>setColumnCount</strong>, run the program, what confuse me is:</p>
<ol>
<li>The table widget works (click to edit, saved to UI after editing), but QTableWidget::item returns null for a existing cell, so the properties of the cell can't be modified</li>
<li>Does it have to call QTableWidget::setItem for every cell?</li>
</ol>
]]></description><link>https://forum.qt.io/topic/80159/does-it-have-to-call-qtablewidget-setitem-for-every-cell</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 18:27:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/80159.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Jun 2017 07:13:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Does it have to call QTableWidget::setItem for every cell? on Sat, 10 Jun 2017 08:44:25 GMT]]></title><description><![CDATA[<p dir="auto">Remember that we're not talking about abstract things. Items take memory. If you have an empty 10000x10000 table that just holds the width and the height - it costs almost nothing, but fill it up with items and you've got yourself a real memory hog.<br />
Only insert the items you actually need.</p>
]]></description><link>https://forum.qt.io/post/398628</link><guid isPermaLink="true">https://forum.qt.io/post/398628</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Sat, 10 Jun 2017 08:44:25 GMT</pubDate></item><item><title><![CDATA[Reply to Does it have to call QTableWidget::setItem for every cell? on Sat, 10 Jun 2017 07:24:07 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
setRowCount();<br />
setColumnCount();</p>
<p dir="auto">That only sets how many to expect. You must insert as many items as you specify.</p>
<p dir="auto"><a href="https://wiki.qt.io/How_to_Use_QTableWidget" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/How_to_Use_QTableWidget</a></p>
]]></description><link>https://forum.qt.io/post/398623</link><guid isPermaLink="true">https://forum.qt.io/post/398623</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 10 Jun 2017 07:24:07 GMT</pubDate></item></channel></rss>