<div>Hi, </div>
<div>I'm writing this message desperately. Using qt (3.3.4), I have a table in a widget, and since it needed to Enabled/Disabled table cells, I used tableItems for it. </div>
<div> </div>
<div>To make it structural in my thinking, I used a list like self.myTable.tableItem = [ [ ] ]. This way, it became possible to save all tableItems in a list and reuse it. ie:</div>
<div> </div>
<div>for iRow in range(0, numberOfRows):</div>
<div>self.myTable.tableItem.append( myTableItemClass) </div>
<div> for iCol in range(0, numberOfCols):</div>
<div>
<div> self.myTable.tableItem[iRow].append( myTableItemClass) </div>
<div>...</div>
<div>...</div></div>
<div> </div>
<div>But the problem arises when I redraw the table for several times (e.g. 16 times). The GUI does NOT crash, however in output windows I get the following messages :</div>
<div> </div>
<div>QGVector::remove: Index -7 out of range<br>QGVector::remove: Index -7 out of range<br>QGVector::remove: Index -7 out of range<br>--- as the number of tableItems in the list ----</div>
<div> </div>
<div>I tried to empty out the list each time the table is redrawed without any success. Some attempts for example:</div>
<div>self.myTable.tableItem = [ [ ] ]</div>
<div>or </div>
<div>del self.myTable.tableItem[ :]</div>
<div>or </div>
<div>del self.myTable.tableItem</div>
<div>or </div>
<div>del self.myTable.tableItem[ 0: 6] (since myTable has 6 columns)</div>
<div> </div>
<div>Any help is greatly appreciated! </div>
<div> </div>
<div>Thanks in advance,</div>
<div>/Ben</div>