Initial port to QT5