[PyQt] Re: QGraphicsWidget crash on exit

Brian Kelley kelley at eyesopen.com
Tue Jul 22 10:45:01 BST 2008


Thanks, I have been using PyQt 4.4.2 so it looks like the problem may  
have been fixed in the interim.  If I can duplicate it after I upgrade  
I'll let everyone know :)

Brian

On Jul 22, 2008, at 6:10 AM, kib2 wrote:

> Brian Kelley a écrit :
>> 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_()
> Hi Brian,
>
> you sample if working fine for me on a Windows XP SP2 machine with  
> PyQt4.4.3-20080612 snapshot .
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt




More information about the PyQt mailing list