[PyQt] Conflict between setuptools & requirements in official PyQt5 docs

Phil Thompson phil at riverbankcomputing.com
Thu Feb 11 09:46:00 GMT 2016


On 11 Feb 2016, at 3:27 am, Kovid Goyal <kovid at kovidgoyal.net> wrote:
> 
> And here's an example that crashes on exit, reliably 100% of the time
> (python3, linux)
> 
> from PyQt5.Qt import QApplication, QMainWindow
> 
> 
> class MainWindow(QMainWindow):
> 
>    def closeEvent(self, ev):
>        ev.accept()
>        QApplication.instance().window = None
> 
> 
> if __name__ == '__main__':
>    app = QApplication([])
>    app.window = MainWindow()
>    app.window.show()
>    app.exec_()
> 
> 
> Simply changing the order of the two statements in closeEvent() causes
> the crash to stop happening.

I don't see what this has to do with the crash-on-exit problem. The QMainWindow C++ will be called from within one of its own virtuals - I don't see how that can be expected to work, no matter what the order of the lines is.

Phil


More information about the PyQt mailing list