Results 1 to 8 of 8

Thread: mouseEvent in QScrollArea giving wrong position ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: mouseEvent in QScrollArea giving wrong position ?

    You can get the "actual" position by mapping the event's position (which is relative to the scroll area) from the widget's (inside the scroll area) point of view.

    Qt Code:
    1. QPoint pos = widget()->mapFromParent(e->pos());
    2. RoboThumbnailClickable * thumb = thumbAt(pos);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    barnabyr (19th April 2006)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.