Thanks to Ilkka Ollakka for qt4 too.