Overloading virtual method of widget without inheriting (PyQt)
Alex Gusarov
alex.m.gusarov at gmail.com
Tue May 27 05:16:51 EDT 2008
> class MyPaintCell(PaintCell):
> def paintcell(self):
> PaintCell.paintcell(self)
> myPaintCell(self)
>
> (hmm, only 4 lines, I overestimated the cost. Sorry)
Yeah, that's funny..
I don't want to do it 'cause I create my form within Designer and
simply drop Calendar widget to it. Then I need to translate it
into .py file, it's OK. But if I want to use a custom derived from
Calendar class instead of it, I need after every refreshing/
translating of form replace few lines in translated file.
I just want to know about existence of other method to do this in
class, that contain instance of Calendar.
By "this" I mean:
Instead of calling original method "paintcell" alone, call it with my
custom metod.
Anyway, thanks.
More information about the Python-list
mailing list