[PyQt] Problems with custom QGraphicsItem

Antonio Valentino antonio.valentino at tiscali.it
Mon Jan 4 17:17:21 GMT 2010


Il giorno 04/gen/2010, alle ore 12.54, Antonio Valentino ha scritto:

> Hi list,
> I' having some problem with a custom QGraphicsItem: the option parameter seems to contain wrong values.
> Using the included test code I would expect an option.levelOfDetail value of 0.5 and an option.exposedRect smaller than the entire item rect.
> Running the following test cone on Mac OS X Snow Leopard I always get:
> 
> option.exposedRect PyQt4.QtCore.QRectF(0.0, 0.0, 1024.0, 1024.0)
> option.levelOfDetail 1.0
> 
> Is it a bug?

No it is a Qt API change:

http://qt.gitorious.org/qt/qt/blobs/d16ba0a93d611689bce9a2732a1cc8c9a317f5bf/dist/changes-4.6.0#line1075

the trick is setting QGraphicsItem::ItemUsesExtendedStyleOptions



--
Antonio Valentino



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100104/4af09629/attachment.html>


More information about the PyQt mailing list