Code updated for Qt5
Update to Qt5