PyQt5 compatibility

Signed-off-by: Adam McNicol <adam@mcnicol.me>