Initial port to Qt5