Thank you very much for the link. Din't know about the timer.

Using timer timeout() to convert the busy wait (or the sleep command) into a signal-slot thingy solved the problem...