Better Qt5 compatibility