[PyKDE] Aligning Text in a Table
Bob Parnes
rparnes at megalink.net
Mon Jun 30 14:02:00 BST 2003
On Sun, Jun 29, 2003 at 09:39:20PM +0200, Simon Edwards wrote:
> * BobTable stores the contents of the cells somewhere. (array of strings if
> the cells hold strings etc).
>
> * paintCell() looks up the contents of the cell (i.e. grab it's string
> contents) and draws the string on the QPainter object.
>
> * BobTable has a method for changing a cell's contents (i.e.
> setStuff(row,col,newstring) )
>
> * setStuff() modifies the internal array of strings (cell contents) and then
> calls QTable's updateCell(row,col). This tells Qt to repaint (redraw) that
> cell.
>
> * When Qt is ready. Qt will call paintCell() for any cells that need
> repainting.
>
> For a C++ example of how to do this kind of thing look at Guarddog's
> checktablelistitem.cpp file:
>
> http://www.simonzone.com/software/guarddog/
>
> cheers,
>
> --
> Simon Edwards | Guarddog Firewall
> simon at simonzone.com | http://www.simonzone.com/software/
> Nijmegen, The Netherlands | "ZooTV? You made the right choice."
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
I have it working now, thank you.
--
Bob Parnes
rparnes at megalink.net
More information about the PyQt
mailing list