Re: [PyQt] About dimensions of QAbstractTableModel

2010-11-30 Thread Vicent Mas
On 2010-11-29 Andreas Pakulat ap...@gmx.de said: I don't know Marks book, but I do know that his material is high quality. Sure for a simple example to learn the basics returning a static number regardless of the parent item passed in is fine. Its easier to understand for beginners, but

[PyQt] About dimensions of QAbstractTableModel

2010-11-29 Thread Vicent Mas
Hi, originally I posted this question the the long thread Bugs galore in QAbstractTableModel but I'm suspicious the question has just been missed because I got no answer and that thread seems now mainly devoted to modtest.py So I've decided to resend my question with a new Subject. I hope I'm

Re: [PyQt] About dimensions of QAbstractTableModel

2010-11-29 Thread Andreas Pakulat
On 29.11.10 18:48:26, Vicent Mas wrote: 2010/11/28 Andreas Pakulat ap...@gmx.de: On 27.11.10 21:27:55, Ian wrote: [...] def rowCount(self, parent = None): ''' return No of rows of data. parent is a QModelIndex ''' return len(self.view) This is wrong, even for

Re: [PyQt] About dimensions of QAbstractTableModel

2010-11-29 Thread Vicent Mas
On 2010-11-29 Andreas Pakulat ap...@gmx.de said: On 29.11.10 18:48:26, Vicent Mas wrote: 2010/11/28 Andreas Pakulat ap...@gmx.de: On 27.11.10 21:27:55, Ian wrote: [...] def rowCount(self, parent = None): ''' return No of rows of data. parent is a QModelIndex '''

Re: [PyQt] About dimensions of QAbstractTableModel

2010-11-29 Thread Andreas Pakulat
On 29.11.10 23:03:10, Vicent Mas wrote: On 2010-11-29 Andreas Pakulat ap...@gmx.de said: On 29.11.10 18:48:26, Vicent Mas wrote: 2010/11/28 Andreas Pakulat ap...@gmx.de: On 27.11.10 21:27:55, Ian wrote: One such thing is that rowCount can be used to implement hasChildren, which is