<?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[Remove row form QSqlTableModel problem?]]></title><description><![CDATA[<p dir="auto">we have QSqlTableModel linked to QSQLITE table.<br />
when i perform removeRow() method the ! appear.<br />
i d'like to disappear row immediately. my Algorithm like this:</p>
<ul>
<li>remove current row.</li>
<li>disappear immediately.</li>
<li>changes saved to database.</li>
</ul>
<p dir="auto">i have try various strategy to solve problem. and then post it here to find standard guidelines:</p>
<p dir="auto">*model strategy: *<br />
@    pctypesTableModel-&gt;setEditStrategy(QSqlTableModel::OnRowChange);@</p>
<p dir="auto">// command signal and slot:<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/connect">@<bdi>connect</bdi></a>(ui-&gt;DeleteButton, SIGNAL(clicked()), this, SLOT(removePcType()));@</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/void">@<bdi>void</bdi></a> editPcTypeDialog::removePcType() // private slot<br />
{<br />
int row = ui-&gt;tableView-&gt;currentIndex().row();<br />
//ui-&gt;tableView-&gt;hideRow(row);</p>
<pre><code>pctypesTableModel-&gt;removeRows(row, 1, ui-&gt;tableView-&gt;currentIndex());
//pctypesTableModel-&gt;submit();
//pctypesTableModel-&gt;submitAll();
</code></pre>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/topic/22344/remove-row-form-qsqltablemodel-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 12:39:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/22344.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Dec 2012 12:12:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Remove row form QSqlTableModel problem? on Thu, 20 Dec 2012 16:11:50 GMT]]></title><description><![CDATA[<p dir="auto">thx too</p>
]]></description><link>https://forum.qt.io/post/160228</link><guid isPermaLink="true">https://forum.qt.io/post/160228</guid><dc:creator><![CDATA[MuhamedAuda]]></dc:creator><pubDate>Thu, 20 Dec 2012 16:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to Remove row form QSqlTableModel problem? on Wed, 19 Dec 2012 13:25:49 GMT]]></title><description><![CDATA[<p dir="auto">bq. QSqlTableModel does no longer implicitly select() once a row has been removed; you will have to call select() explicitly.</p>
<p dir="auto">thank u too i will work on this idea and *post results laters *An Chaa Allah.</p>
]]></description><link>https://forum.qt.io/post/160074</link><guid isPermaLink="true">https://forum.qt.io/post/160074</guid><dc:creator><![CDATA[MuhamedAuda]]></dc:creator><pubDate>Wed, 19 Dec 2012 13:25:49 GMT</pubDate></item><item><title><![CDATA[Reply to Remove row form QSqlTableModel problem? on Wed, 19 Dec 2012 13:02:03 GMT]]></title><description><![CDATA[<p dir="auto"><em>QSqlTableModel</em> does no longer implicitly <em>select()</em> once a row has been removed; you will have to call <em>select()</em> explicitly.</p>
]]></description><link>https://forum.qt.io/post/160069</link><guid isPermaLink="true">https://forum.qt.io/post/160069</guid><dc:creator><![CDATA[lgeyer]]></dc:creator><pubDate>Wed, 19 Dec 2012 13:02:03 GMT</pubDate></item></channel></rss>