Reputation: 1759
I just began to learn PyQt5 in python and the window which opens becomes not responding
import sys
import PyQt5
from PyQt5 import QtWidgets
from PyQt5 import QtCore
x=QtWidgets.QApplication(sys.argv)
y=QtWidgets.QWidget()
y.show()
Upvotes: 0
Views: 482
Reputation: 1160
Try adding the following line to the end of your code:
sys.exit(x.exec_())
I would also recommend following a tutorial such as this one as PyQt does have a framework which needs to be followed closely. (http://zetcode.com/gui/pyqt5/firstprograms/)
Upvotes: 1