calling paint event from switch (event filter) is not possible
Store the mouse coordinates and use them later in paintEvent.