I want to create a right click list. I couldn't find any appropriate class doing directly that, so I started creating one. I made a custom class inheriting QWidget, which has a QList of QLabel in a QGridLayout, so they end up one under the other. I adjusted it generally to look like a right click list. The problem is, I want to make it close when there is mouse click event not in the widget's area. So, I wanted to ask, if there is some function for global mouse click event, which intercepts the mouse click event of a specific object, and which will then allow the program to continue as normal, calling the individual's object mouse click event ?

Also, in QWidget there is no mouse hover event. Is there any way, besides doing it the hard way, to know over which labels the cursor is ?