make compatible with Qt5