View Full Version : Add thousands of item to QListWidget

13th April 2011, 09:23
I am using a QListWidget to show dynamic list.
I have to display the items in my own way so i am using QListWidget::setItemWidget()
to add a custom widget created for each item.
It is working fine when list contains around 500 items.
But as the data has now increasedthere are around 2500+ items to be displayed on the list.
So now it takes a lot of time for the list to get updated.
is there a way to append and remove items on runtime for the current viewport??

13th April 2011, 09:49
Hi daarsh,

My personal feeling on this one is that you should use some model and views classes.


13th April 2011, 10:20
thanks @wladek .
As I am new to QT can you point me some sample example where i can check out usage of model view

13th April 2011, 10:39
First, you should definitely go through the article I posted above.
Then, for the examples see Qt Examples, especially ItemViews examples