Am Sonntag, 8. Oktober 2006 17:26 schrieb Phil Thompson:
> On Saturday 07 October 2006 12:13 pm, Hans-Peter Jansen wrote:
> > Hi Phil,
> >
> > here's is a nasty problem with using a custom QSqlCursor on a
> > QDataTable, I didn't found a workaround yet (other than avoiding
> > this all together, which isn't a feasible option here):
> >
> > Whenever the update() and delRecords() methods on the parent class
> > are called, they show recursive behavior, just like (wrongly)
> > calling self.update(invalidate) in the custom QSqlCursor class.
> >
> > Another aspect on this problem is, that QDataTable insists on a 3
> > arg signature when calling sqlCursor().update(), but the base class
> > must be called with the 2 arg variant.
> >
>
> Your update() will be called for both of the C++ signatures. Your
> code doesn't seem to be doing enough parsing of the argument types to
> work out which one it is.

Stupid me. Thanks for the hint. Next time, I hopefully remember this!

For the sake of completeness, I've attached the corrected script..

Bye,
    Pete

Attachment: qdatatablewithsqlcursorsubclass.py
Description: application/python

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to