add on focus change

This commit is contained in:
王劲鹏
2021-05-27 14:00:19 +08:00
committed by osborn
parent 2782552b41
commit 6f5174df60
6 changed files with 21 additions and 2 deletions

View File

@@ -64,3 +64,11 @@ void DoricInputNode::onTextChange(QString text) {
callJSResponse(onTextChangeId, args);
}
}
void DoricInputNode::onFocusChange(bool hasFocus) {
if (!onFocusChangeId.isEmpty()) {
QVariantList args;
args.append(hasFocus);
callJSResponse(onFocusChangeId, args);
}
}

View File

@@ -20,6 +20,8 @@ public:
QSizeF sizeThatFits(QSizeF size);
void onTextChange(QString text);
void onFocusChange(bool hasFocus);
};
#endif // DORICINPUTNODE_H