Hello,

I have a custom type called polygon, which is a subcalss of QDeclarativeItem.

I want to be notified when a mouse clicked out of it, then dragged into it, (before mouse released!!!).

I have found out that QDeclarativeItem(super class of my custom type) has a function: dragEnterEvent.

I can override it in C++ class, but then everything will be all in C++.

I want to ask if it is possible to write something like
Qt Code:
  1. Polygon {
  2. id: aPolygon
  3. anchors.centerIn: parent
  4. width: 100; height: 100
  5. name: "A simple polygon"
  6. color: "blue"
  7. vertices:[
  8.  
  9. Point{x:20.0; y:40.0},
  10. Point{x:40.0; y:40.0},
  11. Point{x:20.0; y:20.0}
  12. ]
  13.  
  14. dragEnterEvent: aPolygon.doSomething
  15.  
  16.  
  17. }
To copy to clipboard, switch view to plain text mode 

How can it be possible? Using mouse area, but it does not have dragEnterEvent. How can i do this?
Thanks for any idea.