mardi 21 avril 2015

Qt QGraphicsItem middle mouse press event

I'm using Qt 5.3 on Linux. I have a QGraphicsScene and a QGraphicsItem. In my QGraphicsItem I implemented mousePressEvent, mouseReleaseEvent, mouseMoveEvent, to catch mouse events.

It works fine, but I have to double click to get a Middle button click event which is quite strange. Also I discovered that I don't get any mouse move event when nine of the buttons pressed.

I also implemented sceneEvent in my QGraphicsItem but that also misses the mouse mouve even unless a button is pressed, and only detect my middle button when I double click. I have a mouse with quite a few buttons but many button does not work at all in Qt, but works perfectly in other applications (xev gets the events properly).

Is there any way to to make the at least the middle mouse button work correctly?

Aucun commentaire:

Enregistrer un commentaire