[PyQt] QGraphicsPolygonItem / porting from QCanvas to QGraphicsScene

Michael Krauss hippodriver at gmx.net
Thu Jan 22 16:53:54 GMT 2009


On 21/01/09 Brian Kelley <kelley at eyesopen.com> wrote:

> You are having the same problem but in a slightly different way.  It
> looks like the manual you are using is wrong, btw.

I used this manual:
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicspolygonitem.html

> Here are the constructors for QGraphicsPolygonItem:
> 
> http://doc.trolltech.com/4.4/qgraphicspolygonitem.html
> 
> QGraphicsPolygonItem ( QGraphicsItem * parent = 0 )
> QGraphicsPolygonItem ( const QPolygonF & polygon, QGraphicsItem *
> parent = 0 )

I got it working now. The call is (shape is of type QPolygonF):

        QGraphicsPolygonItem.__init__(self, shape)

which match the constructors just as little. 


Thank you for your help
Michael Krauss


More information about the PyQt mailing list