improve qt5 compatibility