Dear sirs,
I have a problem with the mousePressEvent function.
The program is meant to draw lines using QGLWidget. The program works well when I move the mouse to draw the lines (mouseMoveEvent is called correctly) and when I click the left button (mousePressEvent is called and event->button()=Qt::LeftButton is correctly recognized).
The problem is that, once clicking the mouse Right Button, mousePressEvent is called and event->button()=Qt::RightButton is correctly recognized, but then the function mousePressEvent is called again and again when I move the mouse. It seems that the event is not consumed after the first mousePressEvent calling.
I am using Qt5 with MacOs Mountain Lion and the problem was not there when I was using Qt4 (and Snow Leopard as MacOs system).
The problem occurs in a very long a complicated program, so I am not including the code. But if someone feels it is necessary to take a look in the code I will add it.
Thank you for any help
Enrico
Bookmarks