tried to make work for qt5