Qt5 compatibility migration

Migrated the source code to Qt5