1
votes

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 (with middle button) to get a middle button click event which is quite strange. Also I discovered that I don't get any mouse move event when none of the buttons pressed.

I also implemented sceneEvent in my QGraphicsItem but that also misses the mouse move even unless a button is pressed, and only detect my middle button when I double click. I also have a Wacom Intuos, it has (physical) right and middle buttons, the right button works correctly but I also have to double press the middle button to get any mouse press event.

The middle buttons seems working in other applications, and xev reports the events correctly.

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

1
I wonder if extra buttons on the mouse register as some keyboard key strokes. Have you checked that?RedOctober
Sorry, I must made a mistake, I checked again and now I get all the mouse presses as mouse press event, I think I haven't changed anything. I updated the question.VargaD

1 Answers

0
votes

To receive mouse move events you have to enable mouse tracking in the window

setMouseTracking(true);