converted gui.py from PyQt5 to PyQt4