Support for PyQt4 and 5