[Qt4] Add Qt4 Compatibility

Modifies the code to be qt4 compatible.
[Qt4] Fix Qt4 crash report
Various fixes