Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

MouseArea: Pressed and hover at the same time?

$
0
0
Well, finally I did it differnetly and it works. I post here the “algorithmic” soultion in my case (it may help someone) I wanted to get when I was intersecting with a line while I was dragging a rectangle, so what I did was: Rectangle{     id: dragged     MouseArea{         drag.target: dragged         onPositionChanged:{               for each line I may intercept{                      d = distance(line, mouseX,mouseY) //This gives me the line from (mouseX,mouseY) to the line                      if(d < line.width){                           //it means I'm on the line while dragging the rectangle.                      }               }         }     } } well, thank you again for the quick answer ;)

Viewing all articles
Browse latest Browse all 4972

Trending Articles