ported to qt4