Port code to PyQt5
python 2 to 3 first shot