Results 1 to 4 of 4

Thread: QStandardItemModel limits

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QStandardItemModel limits

    folks,

    I used a QStandardItemModel to display a bunch of numbers.. and found that my apps crush if the number of items (row) is really big like 25000.

    so i was wondering if QStandardItemModel has limitation in rows or its the QTableView has limitation by the way i used QTableView as my viewer.....

    baray98

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QStandardItemModel limits

    Can you provide a minimal compilable example reproducing the problem?

  3. #3
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QStandardItemModel limits

    Qt Code:
    1. #include <QtGui>
    2.  
    3. #include <QPushButton>
    4.  
    5.  
    6. int main (int argc,char *argv[])
    7. {
    8. QApplication app(argc,argv);
    9.  
    10. QTableView view;
    11. view.setModel(&model);
    12. for (int row = 0 ; row <20000 ; row++)
    13. {
    14. QStandardItem* item = new QStandardItem(row+1);
    15. model.setItem(row, 0, item);
    16. }
    17. view.show();
    18.  
    19. return app.exec();
    20. }
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QStandardItemModel limits

    I got my error ... its passing an integer when i created QStandardItem

Similar Threads

  1. qtableview QStandardItemModel read only
    By JeanC in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2008, 17:42
  2. QStandardItemModel: copy and append
    By davisjamesf in forum Newbie
    Replies: 1
    Last Post: 19th September 2007, 17:23
  3. Print QStandardItemModel
    By Mrdata in forum Newbie
    Replies: 1
    Last Post: 5th July 2007, 00:14
  4. QTreeView with QStandardItemModel
    By steg90 in forum Newbie
    Replies: 3
    Last Post: 16th May 2007, 10:28
  5. Drag&Drop with QStandardItemModel
    By madcat in forum Qt Programming
    Replies: 4
    Last Post: 7th May 2006, 16:43

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.