0

I just began to learn PyQt5 in python and the window which opens becomes not respondingenter image description here

import sys
import PyQt5
from PyQt5 import QtWidgets
from PyQt5 import QtCore
x=QtWidgets.QApplication(sys.argv)
y=QtWidgets.QWidget()
y.show()
Nimish Bansal
  • 1,719
  • 4
  • 20
  • 37

1 Answers1

1

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/)

aoh
  • 1,090
  • 2
  • 13
  • 25