In qt widget QGraphicsView
I want to detect mouse-press, mouse-release and mouse-move events.
I derived a class from QGraphicsView
and I have overridden the following functions:
- mousePressEvent(QMouseEvent *event)
- mouseReleaseEvent(QMouseEvent *event)
- mouseMoveEvent(QMouseEvent *event)
Now I can detect these mouse events almost everywhere, except for the area where are the scroll bars, which are part of QGraphicsView
.
I want to be able to catch these events and move the scroll bar manually.
Edit:
I am trying to simulate second mouse in windows environment sending WM_LBUTTONDOWN,... events. I would like to be able to detect this events also for scroll bars in QGraphicsView
.
Besides detecting the events I would like to know the event->x() and event->()y position.