PDA

View Full Version : Add thousands of item to QListWidget



daarsh
13th April 2011, 08:23
Hi,
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??

wladek
13th April 2011, 08:49
Hi daarsh,

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

Regards,
wladek

daarsh
13th April 2011, 09: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

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

wladek.