PDA

View Full Version : removing model Items



gyre
25th November 2007, 15:11
Hi people...
I gotta a little mistake somwhere when removing a model items...but wasnt able to figure out where...Im trying to remove selected rows from my model when they are selected...
But cant manage to do so ...Maybe Im just doing simple mistake or something but have spent so much time on this that I dont know any more :)...
Im attaching some codes...Model and Widget...problem is with the removeRows and removing of selected rows...When I sleect them and push the button to remove not all of them get removed...PLS help :)

jpn
25th November 2007, 15:28
You should remove the rows in reverse order. Imagine that you remove rows 0 and 1. Now, if you start by removing row 0, the next row to be removed is no more at index 1 but at index 0.

gyre
25th November 2007, 20:10
Problem solved