How to insert many items into QListView without making the app freeze?
-
Thanks you both for the help . to understand it more .
@Volker what do you mean by :
"need is not achievable with the QStandardItemModel with reasonable effort."
what is wrong with the QStandardItemModel im using ?
what is not achievable with QStandardItemModel that i will need to implement with QAbstractListModel? the adding the items into memory ?
Thanks again . -
With a subclass of the QAbstractXXXModels you can connect the webservice to the model directly. In that processing method you tell the model that you are going to change its contents, then you do the actual changes, then you tell the model that you're ready. This cannot be done from outside the model, as you would have to do with the QStandardXXXModels.
But I read back and noticed, that you use setIndexWidget(). This isn't handled by the models at all, but only by the view. So you cannot speed up things by using another model class here.
-
Ah, I missed the use of that method as well. Sorry.
All bets are off. It is a wart on the face of the model view framework, and it makes sure the whole thing is basically useless. Putting more and more widgets on your view is never, ever going to be fast. Sorry. -
Andre , i asked this and other forums before but i could find solutions to
things like making label with mouse select text for copy when i tried to use
itemdelegate"developer.qt.nokia.com/forums/viewthread/13515/":developer.qt.nokia.com/forums/viewthread/13515/