Advertisement
Guest User

Untitled

a guest
Apr 8th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.33 KB | None | 0 0
  1. image.onStatusChanged: {
  2.         if (image.status == Image.Ready) {
  3.             mouseArea.x = Math.round(.5 * (image.width - image.paintedWidth))
  4.             mouseArea.y = Math.round(.5 * (image.height - image.paintedHeight))
  5.  
  6.             mouseArea.width = image.paintedWidth
  7.             mouseArea.height = image.paintedHeight
  8.         }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement