[PyKDE] Qt4 QPolygon

Jeremy Sanders jeremy at jeremysanders.net
Sat Jul 1 13:06:18 BST 2006


Hi -

Is there a simple way to convert a python list of coordinates into a 
QPolygon in qt4? It seems that passing python lists full of QPoint values 
seems very memory intensive, taking several times more memory than a 
similar list of Python objects.

Would it be possible to allow straight Python lists to be passed to 
functions which take arrays of points?

QPainter.drawLines([1,2,3,4,...]) would be very handy. I seem to 
remember you could do something similar with qt3 using 
QPointArray([1,2,3,4...]).

Thanks

Jeremy

-- 
Jeremy Sanders <jeremy at jeremysanders.net>
http://www.jeremysanders.net/                Cambridge, UK
Public Key Server PGP Key ID: E1AAE053




More information about the PyQt mailing list