Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 16420

How to get mouse press position relative to QScrollArea's widget

$
0
0

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.


Viewing all articles
Browse latest Browse all 16420

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>