I would like to create a menu when the mouse is above a Qwidget and the right button of the mouse is pressed

I looked at mouseevent example but I am not sure how to display the menu.

did anybody came across this or has an idea how to do it??

thanks