[PyQt] PyQt snapshot crash on Qt5.4 with bogus, QGraphicsVideoItem

Phil Thompson phil at riverbankcomputing.com
Sat Jan 3 10:15:15 GMT 2015


On 02/01/2015 11:54 pm, lloyd konneker wrote:
> Thanks.  I think my problem use of QGraphicsItem is as a grouping
> thing, instead of using QGraphicsItemGroup.  The Qt documentation
> suggests you can do that.  As you suggest, I probably should do it
> differently.
> 
> But my understanding of the PyQt code differs from yours.  I thought
> that the casting depended on some ordering of modules, and that
> QMultimediaWidgets was first in the order.  I could be wrong, I didn't
> read very carefully.  The strange thing is, this problem seems new in
> the last six months: my code was working then.

The generated code *should* call things in the right order. The 
QtMultimediaWidgets code will be called before the QtWidgets code. It 
should only call the code in the first place if it doesn't know of any 
existing Python object that wraps the graphics item. Assuming that all 
your graphics items have been created then Python then that suggests 
there is an object ownership problem with graphics items and scenes. 
(Looking at it briefly the handling of item groups looks a little 
strange.) I would need an example to investigate it properly.

Phil


More information about the PyQt mailing list