thanks mate. the thread and the qInstallMsgHandler helped.

But the log file keeps on writing in the same line. it doesnt go to the next line.
there is a endl in the code.

any ideas as to how to fix this?