I'm getting a crash on exit using QGraphicsWidget. It appears to be in the destructor for sipQGraphicsWidget.

Attached is the sample program. I can't tell whether this is a bug in PyQt or Qt, does anyone else have the same issue?

import sys
from   PyQt4 import QtGui, QtCore
from   PyQt4.QtCore import Qt

app = QtGui.QApplication(sys.argv)
scene = QtGui.QGraphicsScene()
scene.setSceneRect(0,0,100,100)
vw = QtGui.QGraphicsView()
vw.setScene(scene)
vw.show()

label = QtGui.QLabel("foo")

p = scene.addWidget(label)
lay = QtGui.QGraphicsLinearLayout()
lay.addItem(p)
w = QtGui.QGraphicsWidget()
w.setLayout(lay)
w.setContentsMargins(8,12,8,8)
w.setFlag(QtGui.QGraphicsItem.ItemIsMovable)
w.setFlag(QtGui.QGraphicsItem.ItemIsSelectable)

scene.addItem(w)

app.exec_()

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to