Is there a way to disable keystrokes when they are repeated? I am developing a game, and when I press a key, the players go into operation mode and return to standby mode when the key is released. The problem is that when keyPressEvent () events are repeated, an automatic keyReleaseEvent () event occurs, which leads to the player immediately returning to standby mode after switching to operating mode, thereby revising the step (which I use for the current animation). What should I do to undo this?
c ++ qt 2d-games movement
Kanghu
source share