Hello,
I am looking for a way to modify the active dragmode based on key modifiers or mouse buttons.
By default, I want it to be RubberBandDrag.
When the space key is pressed or the middle mouse button is pressed I want it to go to ScrollHandDrag.
I tried overriding graphicsview's key press/release events to change the state when the space key is pressed. This works, but because of the keyrepeat, it ends up calling setDragMode over and over.
Is there a better way to do this?
Also using this method does not seem to work to switch to scroll mode on middle mouse button.
Qt Code:
{ if(mouseEvent->button() == Qt::MidButton) }To copy to clipboard, switch view to plain text mode
Bookmarks