Add code for Qt 4.x