Keep selection in a ListView when updating model

  • Hi all,
    I need some ideas to keep the current selection in a ListView when I update the model.

    Is it possible?

  • I'll be more detailed.
    I have an XmlListModel and I show the data in a ListView. The ListView is selectable so I can select an element of the list.

    Sometimes (with a timer) I update the xml data of the model but every time I update I lose the current selection and the list scroll to the top.
    Is there a way to avoid this problem?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.