Hi! Finally I have been able to solve the problem! I put the infinite loop in a thread and I have made that ProcessHwEvent() sends signals to other class. With signals all is ok, the problem was that I called directly to other functions.

Thanks very much to all!!