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
Polygon {
id: aPolygon
anchors.centerIn: parent
width: 100; height: 100
name: "A simple polygon"
color: "blue"
vertices:[
Point{x:20.0; y:40.0},
Point{x:40.0; y:40.0},
Point{x:20.0; y:20.0}
]
dragEnterEvent: aPolygon.doSomething
}
Polygon {
id: aPolygon
anchors.centerIn: parent
width: 100; height: 100
name: "A simple polygon"
color: "blue"
vertices:[
Point{x:20.0; y:40.0},
Point{x:40.0; y:40.0},
Point{x:20.0; y:20.0}
]
dragEnterEvent: aPolygon.doSomething
}
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.
Bookmarks