[PyQt] overriding QSqlRelationalTableModel's data method
frankel at circlesfx.com
Sat Apr 3 16:53:35 BST 2010
On Apr 3, 2010, at 8:42 AM, Phil Thompson wrote:
> On Sat, 3 Apr 2010 08:28:07 -0700, Scott Frankel <frankel at circlesfx.com
>> On Apr 2, 2010, at 5:24 PM, Phil Thompson wrote:
>>> On Fri, 2 Apr 2010 17:05:15 -0700, Scott Frankel <frankel at circlesfx.com
>>>> In my attempts so far, my model instance
>>>> isn't calling its data() method. (See attached.)
>>> Because you've added a data() method to your QWidget subclass. You
>>> need a
>>> sub-class of QSqlRelationalTableModel.
>> Thanks for the tip! There must still be another reason for the
>> model's data() method not being called. Still doesn't work. I hope
>> it's not as obvious as the first! (See revised model, attached.)
> All you've done is replace QWidget with QSqlRelationTableModel. You
> actually using that sub-class as your model.
Got it. Thanks!
More information about the PyQt