Fixes for setModel() for qt 5 or greater