PDA

View Full Version : QListWidget cannot handle too many items



mr.hichem
2nd November 2009, 22:40
Hello Forum,
i want to add 6573 items to a QListWidget object but it seems like it doesn't that much items, the program seems to stop responding, how can i add that much items into QListWidget?

thanks.

wysota
2nd November 2009, 23:00
Don't add them one by one but instead do that in chunks. And when you do, disable updates of the widget. An alternative approach is to used model-view architecture instead of QListWidget.