ported to Qt 4.8