hi,
your post is so useful but i have given up to try
onFocusIn:{ //something}
onFocusIn:{ //something}
To copy to clipboard, switch view to plain text mode
in QML side. It is the later problem.
for the moment, i only want my focusInEvent and focusOutEvent in polygon.cpp to be called when i click the polygon shape on QML viewer.
I succeed to make focusInEvent work by
{
forceActiveFocus();
}
void Polygon::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
forceActiveFocus();
}
To copy to clipboard, switch view to plain text mode
but now the problem have changed. focusOutEvent is not called when i click out of polygon.
And i could not find a mouseOutEvent.
If focusOutEvent do not work why it is there?
Bookmarks