compatibility with qtWidgets for qt 4 and 5