[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] core dumped when destructor is called
From:       Vincent Vande Vyvre <vincent.vandevyvre () swing ! be>
Date:       2012-09-14 17:56:54
Message-ID: 50536FE6.5010107 () swing ! be
[Download RAW message or body]

Le 14/09/12 15:54, Louis Granboulan a écrit :
> I stumbled upon the following bug, which is probably a pyqt bug that
> did not exist in the previous version.
> You should be able to reproduce it on an up-to-date ubuntu with
> python-qt4 4.9.1-2ubuntu1
> The following code generates a SEGV, because the destructor for app is called
>
> import sys
> from PyQt4 import QtGui
> app = QtGui.QApplication(sys.argv)
> view = QtGui.QFrame(None)
> view.graphicsView = QtGui.QGraphicsView()
> view.graphicsView.setScene(QtGui.QGraphicsScene())
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
For me, it's always the case from vers. 4.5 to vers. 4.8.x.

Reimplement the closeEvent() of your MainWindow with
a call of  QtCore.QCoreApplication.processEvents() and the SEGV disappears.

-- 
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic