On Friday 13 June 2003 5:17 pm, Frederick Polgardy Jr wrote:
> Weird, if you add the QColorGroup arg to both (the other overloaded version
> of the method), you then get the opposite exception!:
>
> ...
>     def paintCell(self, painter, row, col, rect, selected, cg):
>         QTable.paintCell(self, painter, row, col, rect, selected, cg)
> ...
>
> TypeError: paintCell() takes exactly 7 arguments (6 given)
>
> Could SIP be mixing up which version is getting mapped to which C++ method?

Remember that Python doesn't support methods with the same name but with 
different signatures - you have to handle this explicitly in code.

What you need to do is something like this...

        def paintCell(self, painter, row, col, rect, selected, cg = None):
                if cg:
                        QTable.paintCell(self, painter, row, col, rect, selected, cg)
                else:
                        QTable.paintCell(self, painter, row, col, rect, selected)

Phil

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to