more compatibility with Qt5