Results 1 to 17 of 17

Thread: How big is big for a qtable (2 m rows is to big) ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11

    Unhappy How big is big for a qtable (2 m rows is to big) ?

    I am having a problem trying to print a vector of 2 000 000 rows x 4 columns of dates and float and display it into a qTable. Around row 400 000 rows, the application cores. with the following error message :

    std::bad_alloc()

    Bizarrely enough :
    Qt Code:
    1. myTable->setNumRows(2000 000);
    2. myTable->setNumCols(4);
    To copy to clipboard, switch view to plain text mode 

    is fine,

    but the program cores in the middle of this loop :

    Qt Code:
    1. for(int line=0; line < 3000000; ++line)
    2. {
    3. ....
    4. myTable->setText(line,0,"dummy string");
    5. ....
    6. }
    To copy to clipboard, switch view to plain text mode 

    I have 2 gig or RAM + 4 gig of swap, so I I do not think that I run out of memory.

    Does anybody have an idea ?

    Thanks.

    Tuan.
    Last edited by wysota; 27th January 2007 at 22:36. Reason: missing [code] tags

Similar Threads

  1. Remove selected rows from a QTableView
    By niko in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2016, 12:49
  2. Replies: 1
    Last Post: 28th September 2006, 06:21
  3. Replies: 10
    Last Post: 24th August 2006, 09:35
  4. QTableView number of rows and scrollbar issue
    By jnk5y in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2006, 06:55
  5. QTable..Vs.. QListView
    By :db:sStrong in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 21:03

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
  •  
Qt is a trademark of The Qt Company.