Hey,

I'm new here and I have a question.

I'm programming a little game and I'm using:

A main.cpp, where I create a QWidget. (MainWindow.cpp + MainWindow.h).

In the QWidget I create a QGraphicsView, a QGraphicsScene and a QGraphicsItem (mouse.cpp and mouse.h) and add the QGraphicsItem to the QGraphicsScene.

My problem is, that I want to move the QGraphicsItem with setPos(), when a Key is pressed, but I don't know, where I should implement the keyPressEvent as a function and how I should set the focuses, so my keyPress isn't ignored.
For example with setFocus(), clearFocus(), setFocusItem() (?)...

Is anybody able to help me?

nearlyNERD