updated to support Qt5