ported to Qt 5