PDA

View Full Version : QML manually emit key press signal



mushroom
7th July 2011, 22:03
Hello,

I'm working on a QML game where the user can control a spaceship my moving it left/right with the arrow keys and firing at the enemy with the space bar.

everything works, but i found the fact that if the user has the right/left key pressed and then hits space, the ship fires and then stops moving and the user has to release the arrow button and press it again to continue moving.

Is it possible to manually emit the "pressed" signal with the right/left key after releasing the space bar to fix this?

Thanks.

raja26
18th August 2011, 17:02
Try to implement the Animations with ParallelAnimation and use the property running to start and stop the animation. Hope it will help you.