<?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[QML ListView is not updated for removal]]></title><description><![CDATA[<p dir="auto">I have a custom model that is derived from QAbstractListModel and it has a variable (_sqlTableModel) holding an instance of QSqlTableModel.  The code is as follows:</p>
<p dir="auto">@<br />
beginResetModel();<br />
_sqlTableModel-&gt;removeRows(index, 1);<br />
endResetModel();<br />
@</p>
<p dir="auto">The problem that I am seeing is that the view doesn't get refreshed and it still displays the deleted item even though the item is actually removed from the model.  This doesn't make sense.  Any advice to correct this issue?</p>
<p dir="auto">I have similar code with append, insert, and move and everything works fine.</p>
<p dir="auto">Thanks for any tip.</p>
<p dir="auto"><em>[EDIT: code formatting, Volker]</em></p>
]]></description><link>https://forum.qt.io/topic/3847/qml-listview-is-not-updated-for-removal</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 10:29:59 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/3847.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Feb 2011 18:43:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QML ListView is not updated for removal on Tue, 22 Feb 2011 18:05:43 GMT]]></title><description><![CDATA[<p dir="auto">Thanks!  That works.</p>
]]></description><link>https://forum.qt.io/post/77527</link><guid isPermaLink="true">https://forum.qt.io/post/77527</guid><dc:creator><![CDATA[tuanster]]></dc:creator><pubDate>Tue, 22 Feb 2011 18:05:43 GMT</pubDate></item><item><title><![CDATA[Reply to QML ListView is not updated for removal on Sat, 19 Feb 2011 07:32:04 GMT]]></title><description><![CDATA[<p dir="auto">For removing rows you should use beginRemoveRows()\endRemoveRows()</p>
]]></description><link>https://forum.qt.io/post/77322</link><guid isPermaLink="true">https://forum.qt.io/post/77322</guid><dc:creator><![CDATA[ixSci]]></dc:creator><pubDate>Sat, 19 Feb 2011 07:32:04 GMT</pubDate></item></channel></rss>