On 21/06/11 17:04, David Townshend wrote:
The problem is that creating (and quitting) multiple QApplications in
succession causes a segfault. This situation tends to occur in unit tests,
particularly in testing subclasses of QApplication.
The following snippet illustrates the problem:
>>> from PyQt4 import QtGui
>>> app = QtGui.QApplication([])
>>> app.quit()
>>> app = QtGui.QApplication([])
>>> app.quit()
>>> app = QtGui.QApplication([])
Segmentation fault
according to the qt docs, only one application object should be created
at a time, and there is a global qApp pointer which refers to the
current instance.
this suggests that, in pyqt, something like the following should work:
from PyQt4 import QtGui
QtGui.qApp = app = QtGui.QApplication([])
app.quit()
QtGui.qApp = app = None
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt