Trying to open 2 windows using PyQt5 we experienced a brutal python exit with segmentation error message.
The minimal reproducing error is:
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtCore, QtGui, QtWidgets
>>> def application():
... import sys
... app = QtWidgets.QApplication(sys.argv)
... Dialog = QtWidgets.QDialog()
... Dialog.show()
... app.exec_()
...
>>> import sys
>>> app = QtWidgets.QApplication(sys.argv)
>>> MainWindow = QtWidgets.QMainWindow()
>>> list = application()
>>> MainWindow.show()
Segmentation error (core dumped)
We suspect that the first window hamper the second window opening. How can we open the two windows without problem ?
QApplicationobjects?