qDebug should work.
How do you use it?
And what exactly do you mean by message handler?