If I have a wide widget in a QScrollArea, and I press the mouse on it, then I get a mouse position (in mousePressEvent()
) relative to the scroll area (if I scroll, it changes).
How can I get the mouse position relative to that wide widget inside the scroll area?
I tried to use a combination of functions mapTo()
, parentWidget()
, viewport()
and had no success.