<?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[Blocking the ListView position when refreshing the model]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have a QListView with a ScrollBar in a Qml application. The model is refreshed every 2 seconds. Whenever it is updated, the list view is reset to the top. How to make the position of view not change? The number of elements in the model is unchanged.</p>
]]></description><link>https://forum.qt.io/topic/145747/blocking-the-listview-position-when-refreshing-the-model</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 00:54:14 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145747.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Jun 2023 13:54:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Blocking the ListView position when refreshing the model on Wed, 14 Jun 2023 15:19:48 GMT]]></title><description><![CDATA[<p dir="auto">What is the type of the model? How is it refreshed?</p>
<p dir="auto">You should use a proper <code>QAbstractListModel</code> if you have a dynamic model.</p>
]]></description><link>https://forum.qt.io/post/761426</link><guid isPermaLink="true">https://forum.qt.io/post/761426</guid><dc:creator><![CDATA[GrecKo]]></dc:creator><pubDate>Wed, 14 Jun 2023 15:19:48 GMT</pubDate></item><item><title><![CDATA[Reply to Blocking the ListView position when refreshing the model on Wed, 14 Jun 2023 14:14:55 GMT]]></title><description><![CDATA[<p dir="auto">Since the model is refreshing you can try to remember current index &amp; set the currentIndex every time you reset the model.</p>
]]></description><link>https://forum.qt.io/post/761416</link><guid isPermaLink="true">https://forum.qt.io/post/761416</guid><dc:creator><![CDATA[dheerendra]]></dc:creator><pubDate>Wed, 14 Jun 2023 14:14:55 GMT</pubDate></item></channel></rss>