Qt4 and Qt5.0 fix