[PyQt] PyQt speed.

David Boddie david at boddie.org.uk
Mon Nov 12 00:21:06 GMT 2007


On Sun Nov 11 23:09:06 GMT 2007, Vadim Gutnik wrote:
> On Nov 9, 2007 6:49 PM, David Boddie <david at boddie.org.uk> wrote:
> >
> > I followed the advice given in the task description. The resulting
> > performance is _much_ better - you have to see it to believe it. :-)
> 
> Wow. Thank you. That's much
> better. setViewportUpdateMode(QGraphicsView.SmartViewportUpdate)
> helped immensely. Thank you!

You're welcome. :-)

> > If you can, you should use PyQt 4.3.1 with Qt 4.3 so that you can take
> > advantage of the improved performance and configurability of
> > QGraphicsView.
> 
> I seem to be using a late-enough version of PyQt that this
> worked. Thank you! That was the best answer I could have expected. :)

That's good to hear. You might also want to look at the various render hints
that can be enabled for the view if you want to improve the appearance of
the drawing:

  http://doc.trolltech.com/4.3/qgraphicsview.html#renderHints-prop

Adding this line after you have created the view should make things look a
bit better:

  self.view.setRenderHints(QPainter.Antialiasing)

David



More information about the PyQt mailing list