Add debugging output for Qt5 vs Qt4