×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    58

    QTableWidget Memory Handling

    Hello,

    What's the best way to handle memory exhaustion with QTableWidget? Specifically, I'm creating a table widget where, based on user input, the number of rows can be more than memory can accomodate. QTableWidget::setRowCount doesn't seem to throw std::bad_alloc. What's the best course of action here? Use Symbian leaves and traps? Any Symbian calls are being made by Qt so the leaves should get converted by Qt to C++ exceptions, right? Ideally, the best solution would be to generate only those rows viewable in the display (ala iOS UITableView) but there doesn't seem to be much support for that as far as I can see. I'd rather not put in a hard fixed limit. Is there example code somewhere?

    Phil
    Last edited by pgarofalo; 2011-11-11 at 21:36.

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    58

    Re: QTableWidget Memory Handling

    After some additional research, it looks like the Model/View pattern using QTableView and a class derived from QAbstractTableModel should address this problem such that only the visible rows are actually loaded into memory. Although it will make it difficult to type, I'll keep my fingers crossed.
    Last edited by pgarofalo; 2011-11-12 at 02:11.

Similar Threads

  1. Moving rows in QTableWidget
    By nickich in forum Qt
    Replies: 0
    Last Post: 2011-02-23, 22:54
  2. Replies: 4
    Last Post: 2010-10-04, 15:30
  3. Memory handling in Nokia 6680
    By ronniedjames in forum Mobile Java General
    Replies: 3
    Last Post: 2006-07-04, 19:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×