[PyKDE] Aligning Text in a Table

Bob Parnes rparnes at megalink.net
Sun Jun 29 01:07:00 BST 2003


On Sat, Jun 28, 2003 at 03:01:12PM +0100, Phil Thompson wrote:
> On Saturday 28 June 2003 2:10 pm, Simon Edwards wrote:
> > Hi,
> >
> > > Thanks for your response. I got lost trying to follow your idea. In the
> > > past I have subclassed my own classes and reimplemented methods in order
> > > to make changes suiting the subclass. But here I cannot even make the
> > > simplest reimplementation of paintCell. For example, the method,
> > >
> > >   def paintCell(self,p,row,col,r,selected):
> > >       QTable.paintCell(self,p,row,col,r,selected)
> >
> > Does this work?:
> >
> > def paintCell(self,p,row,col,r,selected,cg):
> >     QTable.paintCell(self,p,row,col,r,selected,cg)
> >
> > Maybe PyQt doesn't have the 6 arg version (it's depreciated BTW),
> 
> This was discussed on the mailing list within the last 2 weeks. Both the 6 and 
> 7 argument variations are implemented but, because Python doesn't support 
> function overloading, your re-implementation must handle both.
> 
> In other words...
> 
> def paintCell(self,p,row,col,r,selected,cg = None):
>     if cg:
>         QTable.paintCell(self,p,row,col,r,selected,cg)
>     else:
>         QTable.paintCell(self,p,row,col,r,selected)
> 
> Phil
> 
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Thank you, I'm sorry I missed the discussion.


-- 
Bob Parnes
rparnes at megalink.net




More information about the PyQt mailing list