Revert "Removed dead code and upgraded to qt5"

This reverts commit 05ff7c4b614b6e11f1e56cb9436f37521620f115.