[PyQt] PyQt snapshot crash on Qt5.4 with bogus QGraphicsVideoItem instance
lloyd konneker
bootch at nc.rr.com
Wed Dec 17 20:58:46 GMT 2014
Removing the %ConvertToSubClassCode in qgraphicsvideoitem.sip did not
seem to help. I assume you mean in /usr/share/sip/PyQt5...
A reduced example failed to exhibit the same symptoms. This is a
snippet of a reduced example:
class MyGroup(QGraphicsObject):
def addToGroup(self, item):
print(item)
print(self.childItems())
item.setParentItem(self)
print(self.childItems())
assert item in self.childItems()
...more
In my app it prints:
DrawMorphHandleItem at scenePos PyQt5.QtCore.QPointF()
[]
[<PyQt5.QtMultimediaWidgets.QGraphicsVideoItem object at 0xa9cf8b74>]
and the assertion fails. In other words, the Qt method setParentItem()
puts some garbage object in childItems.
The mro of the garbage object doesn't include the class of my 'item'
object, I'm not using QGraphicsVideoItem anywhere.
I will build the example more like my app and try again, but I don't
understand why the behaviour should depend on the class of 'item.'
More information about the PyQt
mailing list