To paint the rectangle in qml using mouse area. I dont know how to use drag to paint the rectangle. Here is the code i am working with

Qt Code:
  1. Rectangle {
  2. id: container
  3. width: 600; height: 200
  4.  
  5.  
  6. MouseArea {
  7. anchors.fill: parent
  8. drag.target:
  9. drag.axis:
  10.  
  11. }
  12. }
To copy to clipboard, switch view to plain text mode