You do not activate the events.
A mouse move event is received whenever you move the mouse over the widget.

So, mouse move events are always received, given that the mouse is hovered over your widget ( RubberBand ).

In slotOnPasteButton() all you have to do is create the rubber band( QRubberBand ) and set its initial geometry and show it( like it is done in the mousePressEvent form the example ). The mouseMoveEvent has to test is if the QRubberBand is NULL - if not NULL, then set it's geometry, otherwise, do nothing.

To test for modifiers use QMOuseEvent::modifiers().