Replace PyQt5 imports with PyQt4 ones

- The only issue seems to be that PyQt4 does not have
QWidget.hasHeightForWidth()