updated for qt5