Results 1 to 4 of 4

Thread: Add thousands of item to QListWidget

  1. #1
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Add thousands of item to QListWidget

    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??

  2. #2
    Join Date
    May 2010
    Posts
    61
    Thanks
    2
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Add thousands of item to QListWidget

    Hi daarsh,

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

    Regards,
    wladek
    Last edited by wladek; 13th April 2011 at 08:53.
    One second is long, everything longer than two seconds is definitely too long.

  3. #3
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Add thousands of item to QListWidget

    thanks @wladek .
    As I am new to QT can you point me some sample example where i can check out usage of model view

  4. #4
    Join Date
    May 2010
    Posts
    61
    Thanks
    2
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Add thousands of item to QListWidget

    First, you should definitely go through the article I posted above.
    Then, for the examples see Qt Examples, especially ItemViews examples

    wladek.
    One second is long, everything longer than two seconds is definitely too long.

Similar Threads

  1. QListWidget item value extracted
    By hojoff79 in forum Newbie
    Replies: 1
    Last Post: 24th January 2011, 09:31
  2. How to set selected item of a QListWidget?
    By Lawand in forum Qt Programming
    Replies: 9
    Last Post: 5th April 2009, 11:23
  3. QListWidget Item
    By csvivek in forum Qt Programming
    Replies: 1
    Last Post: 15th June 2008, 09:02
  4. Item Selection in QListWidget
    By mclark in forum Qt Programming
    Replies: 2
    Last Post: 12th February 2008, 15:53
  5. Reg - add item in QListWidget
    By suresh in forum Newbie
    Replies: 1
    Last Post: 1st September 2006, 17:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.