Thanks for the reply.

Actually it does not make any difference when I use Qt::Windows flag but I will try out second method of changing the keyPressEvent.