fixed Qt5 compat

see scikit-image#1316
except for the PEP8 violation ;)