2026年5月25日15:57:50

This commit is contained in:
2026-05-25 15:58:11 +08:00
parent 1cb9d5ac42
commit 358a56f602
20 changed files with 413 additions and 492 deletions
+11
View File
@@ -1106,6 +1106,17 @@ void InputMethod::onInputMethodClicked(){
void InputMethod::onEnterClicked(){
// userInputed("\n");
// 编辑界面的文本输入框,需要按下回车时触发回车事件,同时放弃焦点
// 嘿!什么叫特事特办啊 byons@2026年5月25日
if(m_edit && m_edit->property("Enter replace enter").toBool()) {
QKeyEvent pressEvent(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier);
QKeyEvent releaseEvent(QEvent::KeyRelease, Qt::Key_Enter, Qt::NoModifier);
QApplication::sendEvent(m_edit, &pressEvent);
QApplication::sendEvent(m_edit, &releaseEvent);
m_edit->clearFocus();
}
emit onEnterClickedConfirm();
this->hide();
}