[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] About dimensions of QAbstractTableModel
From:       Vicent Mas <uvemas () gmail ! com>
Date:       2010-11-30 9:40:13
Message-ID: 201011301040.14661.uvemas () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On 2010-11-29 Andreas Pakulat <apaku@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 that doesn't mean its correct.
> And once your model gets more complicated or you use it for different
> views you'll eventually run into behavioural weirdness. At that point
> you should verify that your model works sanely (according to what Qt's
> itemviews define as sane, which may not be the same as the definition of
> a human brain ;). Best/easiest way to do that is adding the mentioned
> modeltest to your model and run your app. One of the things that it'll
> instantly assert on is returning non-0 amount of rows for a valid
> parent but no index/data for it.
> 

I completely agree. I insisted in the simple approach because I was focused on 
the Ian's sample code, which seems to fit in the simplest case.

Thanks a lot for your enlightening answer,

Vicent
::

	Share what you know, learn what you don't


["signature.asc" (application/pgp-signature)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic