IME support for multi-language input
| 8352 | |
| 8353 | // IME support for multi-language input |
| 8354 | void MainWindow::inputMethodEvent(QInputMethodEvent *event) { |
| 8355 | // Forward IME events to the focused widget |
| 8356 | QWidget *focusWidget = QApplication::focusWidget(); |
| 8357 | if (focusWidget && focusWidget != this) { |
| 8358 | QApplication::sendEvent(focusWidget, event); |
| 8359 | event->accept(); |
| 8360 | return; |
| 8361 | } |
| 8362 | |
| 8363 | // Default handling |
| 8364 | QMainWindow::inputMethodEvent(event); |
| 8365 | } |
| 8366 | |
| 8367 | QVariant MainWindow::inputMethodQuery(Qt::InputMethodQuery query) const { |
| 8368 | // Forward IME queries to the focused widget |
nothing calls this directly
no outgoing calls
no test coverage detected