Why are you trying to get a global position? You don't need a global position but position in the viewport's coordinate space.
This should work:
Qt Code:
To copy to clipboard, switch view to plain text mode
or something like that, depending on what is the receiver of the event.
Bookmarks