back port to Qt 4.7