I had a similiar problem a day ago, i posted my solution in the end how to catch Tab, enter and space and so on.

http://www.qtcentre.org/forum/showthread.php?t=670