[PyKDE] Aligning Text in a Table

Simon Edwards simon at simonzone.com
Sat Jun 28 15:14:01 BST 2003


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),

> Furthermore, I don't know how to identify the QPainter object that Qt
> passes. I could not find any place in the documentation that describes
> how to do this. In my attempt above, I created one.

errrr... You don't need to identify anything. YOu just draw with the QPainter 
that you get.

cheers,

-- 
Simon Edwards             | Guarddog Firewall
simon at simonzone.com       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."




More information about the PyQt mailing list