Made widget both Qt5 and Qt4 compatible