Think of a window designed with Qt Designer. Lots of sub-widgets. There is a QWidget derived class for this window which implements the virtual mouse methods of QWidget (mousePressEvent, mouseReleaseEvent, mouseMoveEvent)
Some of the sub-widgets are clean of controls, and are defined in the stylesheet as "background: transparent"
My question:
When such a transparent sub-widget is clicked, i do get the MousePressEvent called in my QWidget derived class. That's all fine. I do however would like to know WHICH sub-widget was just clicked. I'd like to avoid geometry comparisons to map the click location to the dimensions of my sub-widgets.
Is there a way to get this information from the mouseEvent object? I can't seem to see anything there related to the originator of the mouse event.