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
Qt 6.11 is out! See what's new in the release blog

Find QScrollArea viewport location relative to embedded widget

Scheduled Pinned Locked Moved Qt in Education
1 Posts 1 Posters 2.4k Views 1 Watching
  • 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 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

    • Login

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