[PyKDE] Huge amount of time
Vincent Wagelaar
vincent at ricardis.tudelft.nl
Wed Aug 20 22:16:01 BST 2003
On Wednesday 20 August 2003 21:56, Frederick Polgardy Jr wrote:
> Faster to create, that is. They may be a tiny hair slower to use,
> because xrange computes each index when you ask for it.
>
> On Wednesday 20 August 2003 02:52 pm, Frederick Polgardy Jr wrote:
> > Xrange provides iterator semantics without actually creating a
> > sequence, so it will always be faster, but the speed isn't noticeable
> > to a human in this case.
Much easier is to override paintCell of QTable.
def paintCell ( self, p, row, col, cr, selected):
self.verticalHeader().setLabel(row, str(row *2))
QTable.paintCell ( self, p, row, col, cr, selected, self.colorGroup())
The header will now be painted on demand....
My experience with PyQT is to pull the data from your data structures. Works
much faster than iterating over objects.
Cheers,
Vincent
More information about the PyQt
mailing list