February 15, 2012

tempest766 tempest766
Lab Rat
3 posts

find QScrollArea viewport location relative to embedded widget

 

What is the sequence to determine where in a large widget the current QScrollArea viewport exists? I assumed that viewport()->x() and veiwport()->y() would give me the relative offsets where the view port starts in the larger base widget but I was mistaken.

I catch mouse click events in the QScrollArea window, but I need the event x/y location to be normallized to the whole image, not simply relative to the current visable portion.

Do I have to query the scrollbars or is there a more direct way?

Thoughts?

0 replies

 
  ‹‹ Need help... confused a bit with Qt Creator      Capturing MJPEG ››

You must log in to post a reply. Not a member yet? Register here!