Segmentation fault on exit in pyQt5 but not pyQt4
问题 The workaround to a crash upon exit given in this answer works in pyqt4. But not using pyqt5, where there is often (more than half the times) a segmentation fault. Only the import lines changed #!/usr/bin/python import sys #toolkit = "Qt4" toolkit = "Qt5" if toolkit == "Qt4": # Qt4 (no crash) from PyQt4.QtCore import * from PyQt4.QtGui import * elif toolkit == "Qt5": # Qt5 (crash) from PyQt5.QtWidgets import ( QApplication, QGraphicsScene, QGraphicsView ) app = QApplication(sys.argv) grview =