[Qt] fix a <Qt4.7 compatibility issue raised in #5228