Fix various qt4 issues

After merging oe-lite 4.1 branch into a customer project, some issues with qt4 was found.