<?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[Display bulk data on QTableWidget]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I need to display bulk data on QTableWidget, for which I need to show all the data at one go. Currently, I am running the following script which populates the data on QTableWidget in an item by item manner. I am using dataframe (python) to store data and showing it pushing data item by item on QtableWidget. This is how I am doing it right now:</p>
<pre><code>            self.ui.out_table.setRowCount(df.shape[0])
            for row in range (0, df.shape[0]):
                for col in range (0, len(df.columns) + 1):
                        data = str(final_data.iloc[row, col] )
                        self.ui.out_table.setItem(row, col, QTableWidgetItem(str(data)))
</code></pre>
<p dir="auto">Is there a way by which I can display the complete dataframe in one go?</p>
]]></description><link>https://forum.qt.io/topic/89385/display-bulk-data-on-qtablewidget</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 23:36:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/89385.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Mar 2018 03:46:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Display bulk data on QTableWidget on Sat, 31 Mar 2018 20:28:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/piyush">@<bdi>Piyush</bdi></a><br />
In addition to what <a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> writes, note <a href="http://doc.qt.io/qt-5/qtablewidget.html#setItem:" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qtablewidget.html#setItem:</a></p>
<blockquote>
<p dir="auto">If you want to set several items of a particular row (say, by calling setItem() in a loop), you may want to turn off sorting before doing so, and turn it back on afterwards; this will allow you to use the same row argument for all items in the same row (i.e. setItem() will not move the row).</p>
</blockquote>
]]></description><link>https://forum.qt.io/post/450601</link><guid isPermaLink="true">https://forum.qt.io/post/450601</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sat, 31 Mar 2018 20:28:56 GMT</pubDate></item><item><title><![CDATA[Reply to Display bulk data on QTableWidget on Fri, 30 Mar 2018 08:07:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
QTableWidget is item based and you give it data by inserting items.<br />
Im not sure what you mean "in one go"<br />
There is no way around using items.</p>
<p dir="auto">You could use the View version and a custom model and store the data directly in model.<br />
<a href="http://doc.qt.io/qt-5/qabstracttablemodel.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qabstracttablemodel.html</a></p>
<p dir="auto">Alternatively, if its just so data is shown at same time, you can use<br />
setUpdatesEnabled(bool)<br />
so it first draws when finished adding.</p>
]]></description><link>https://forum.qt.io/post/450403</link><guid isPermaLink="true">https://forum.qt.io/post/450403</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Fri, 30 Mar 2018 08:07:38 GMT</pubDate></item></channel></rss>