Fix for Qt 5 and above