I m writing a test app that tests another application with a bunch of menus. I simulate keyPresses by using QT::keyPress. However, at some point it doesn t accept keyPresses anymore, until I learned you need to use keyRelease as well (according to the documentation which was a bit vague for me, it says "Note: At some point you should release the key using keyRelease()." --- but when? right after each keyPress?)
Calling a keyRelease after each keyPress simulates a keyPress as well which is weird. Calling keyRelease once after the very first call of keyPress, made the rest of the keyPresses work and the remaining keyPresses not work.
I m confused. Can somebody tell me when is the proper time to use keyRelease?