ported to Qt5