You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using count as the model in ListView, the problem is that model value will be changed whenever we add or remove an item, and the scroll will be reset. Using a QAbstractListModel is a better solution, because the model is a QObject, and its value (reference/pointer) won't change when we change it, thus eliminating the need to do special handling when the count changes.