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

@@ -11,7 +11,9 @@ void DoricInputBridge::onTextChange(QString pointer, QString text) {
inputNode->onTextChange(text);
}
void DoricInputBridge::onFocusChange(QString pointer) {
void DoricInputBridge::onFocusChange(QString pointer, bool hasFocus) {
QObject *object = (QObject *)(pointer.toULongLong());
DoricInputNode *inputNode = dynamic_cast<DoricInputNode *>(object);
inputNode->onFocusChange(hasFocus);
}

View File

@@ -15,7 +15,7 @@ public:
void onTextChange(QString pointer, QString text);
Q_INVOKABLE
void onFocusChange(QString pointer);
void onFocusChange(QString pointer, bool hasFocus);
signals:
};