I am afraid I don't understand: the listview has a loop?

Have you tried exporting your data through a model? Maybe using one of Qt's SQL models or QStandardItem model?

Cheers,
_