Re: [PyQt] TypeError thrown by rowsAboutToBeRemoved() when deleting a row from a QAbstractTableModel

2010-07-15 Thread Simon Hibbs
I'm an idiot. It wasn't the rowsAboutToBeRemoved method of the model that was the problem. It was the rowsAboutToBeRemoved method in one of my QAbstractItemView subclasses. I was missing the 'self' reference in the arguments lists. Duh! Oh boy, did that take some tracking down. If I'd had an

[PyQt] TypeError thrown by rowsAboutToBeRemoved() when deleting a row from a QAbstractTableModel

2010-07-14 Thread Simon Hibbs
The method implementation looks like this: def removeRows(self, position, rows=1, index=QModelIndex()):     # problem on next line, which raises rowsAboutToBeRemoved signal     self.beginRemoveRows(QModelIndex(), position, position + rows - 1)     self.units = self.units[:position] + \