Fixes to allow correct output display under Qt4.x