Fixed a bug when using pyqt4 + python 2 with a preset QT_API