Another option that you might want to consider is using SFML.
http://www.sfml-dev.org/
SFML is a free multimedia C++ API that provides you low and high level access to graphics, input, audio, etc.
Here is a tutorial on how to integrate it into Qt.
http://www.sfml-dev.org/tutorials/1.6/graphics-qt.php
And here is the input class.
http://www.sfml-dev.org/documentation/1.6/classsf_1_1Input.htm