Correct PyQt4 API related issues.