* With Tiago Coutinho: ported to Qt4