Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Learning
  3. Qt in Education
  4. Find QScrollArea viewport location relative to embedded widget
QtWS25 Last Chance

Find QScrollArea viewport location relative to embedded widget

Scheduled Pinned Locked Moved Qt in Education
1 Posts 1 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tempest766
    wrote on 15 Feb 2012, 11:07 last edited by
    #1

    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?

    1 Reply Last reply
    0

    1/1

    15 Feb 2012, 11:07

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved