Support both Qt4 and Qt5