[PyKDE] Re: alignment in table

Andreas Pakulat apaku at gmx.de
Sat May 13 01:14:29 BST 2006


On 12.05.06 14:25:41, Mike Rovner wrote:
> Jim Bublitz wrote:
> >You need to do something like this:
> >--------------------
> >class AlignTableItem (QTableItem):
> >	def __init__  (self, table, et):
> >		QTableItem.__init__ (self, table, et)
> >	def alignment (self):
> >		return Qt.AlignCenter
> 
> I guess you can skip "empty" init:

No you can't, because

a) __init__ is not empty, it contains the QTableItem initializer
b) the QTableItem initializer needs to be called for the whole thing to
work, else the C++ object-part of AlignTableItem will be deleted right
after the end of __init__.

Andreas

-- 
Good day to let down old friends who need help.




More information about the PyQt mailing list