Re: Memory fault when inserting QTableItem into QTable

Oliver Kreuer <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Message-ID <[email protected]>
Hello,

I've discovered a work around:
Before I insert a table item I take all items from the table using:

sub clearTable
{
     if (table->numRows() > 0)
     {
         if (table->numCols() > 1)
         {
             for (my $elem = 0; $elem < table->numRows() ;$elem++ )
             {
                 table->takeItem(table->item($elem,0));
                 table->takeItem(table->item($elem,1));
             }
         }
         else
         {
             for (my $elem = 0; $elem < table->numRows() ;$elem++ )
             {
                 table->takeItem(table->item($elem,0));
             }
         }
     }
}

This works but it's not a pleasant solution for this problem.
Any suggestions?

Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.