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

paint on rectangle using mouse area qml(Qt-5 ubuntu)

$
0
0
It is available and should work by simply press and dragging the mouse on the rectangle but I do not have 5.0.1 around to verify if there are issues with my example there. There could be a bug that has been fixed so you can start by debugging the onPaint and see if you are getting paint events properly. Note that I forgot to set a width and height in the code above so perhaps you simply have to set those properties to say 400 in my example to make it work. In your case you might not have to use a canvas though since you can easily draw both a rectangle or circle without it. I would suggest that you start to read a bit about how MouseArea works in the documentation :)

Viewing all articles
Browse latest Browse all 4972

Trending Articles