How to capture right clicked

Hi all,
I am looking to capture right clicked and create a new qt page, but I do not know how to do this.
Can someone tell me a possible solution

Usually when we implement interaction in views, we use markups: You activate place mode and add an observer to the markups node that is being placed. When the user clicks in the image then the markups node is updated and you can perform any action in the callback function.

You can also quite easily capture interaction events by implementing a custom Segment Editor effect, which is convenient if the user is already working on segmentation.

If none of these options are good enough then you need to go one level lower and add observers to the view’s render window interactor.

Thank you very much.