Fix for PyQt 4.6 compatibility.