Deal with the compatibility with Qt4 and Qt5