On Windows, QScintilla (QsciScintilla) crashes reproducibly when Qt Virtual Keyboard is enabled as the input method module. The crash happens when the editor contains any text (non-empty) and the user clicks inside the text area with the mouse (focus/caret positioning).
-
Windows
-
QScintilla (QsciScintilla)
-
Qt Virtual Keyboard enabled via environment variables:
- QT_IM_MODULE=qtvirtualkeyboard
- When QT_VIRTUALKEYBOARD_DESKTOP_DISABLE=0 (or unset), the virtual keyboard tries to participate on desktop and the crash is reproducible.
- When QT_VIRTUALKEYBOARD_DESKTOP_DISABLE=1 , the virtual keyboard does not participate and the crash does not occur.
What we tried We attempted to prevent the virtual keyboard from appearing only for QsciScintilla by disabling input methods on the editor widget:
-
setAttribute(Qt::WA_InputMethodEnabled, false)
-
Consuming IME-related events in event() (e.g. QEvent::InputMethod , QEvent::InputMethodQuery , QEvent::RequestSoftwareInputPanel , etc.)
-
Calling QGuiApplication::inputMethod()->hide() in focusInEvent() / mousePressEvent()
However, the crash still occurs when clicking the editor text area.
Expected behavior When Qt Virtual Keyboard is enabled, QsciScintilla should not crash on mouse click / caret movement. If the widget does not support the virtual keyboard, it should safely ignore/refuse IME interaction instead of crashing.
Minimal reproduction steps
- On Windows, set:
- QT_IM_MODULE=qtvirtualkeyboard
- QT_VIRTUALKEYBOARD_DESKTOP_DISABLE=0
- Create a simple app with a single QsciScintilla widget.
- Put any text into the editor (type or setText() to non-empty).
- Click inside the editor text area with the mouse.
- Application crashes.
Additional note Standard Qt widgets like QLineEdit can work with the virtual keyboard in the same application; the issue only triggers on the QsciScintilla click/focus/caret path.
On Windows, QScintilla (QsciScintilla) crashes reproducibly when Qt Virtual Keyboard is enabled as the input method module. The crash happens when the editor contains any text (non-empty) and the user clicks inside the text area with the mouse (focus/caret positioning).
Windows
QScintilla (QsciScintilla)
Qt Virtual Keyboard enabled via environment variables:
What we tried We attempted to prevent the virtual keyboard from appearing only for QsciScintilla by disabling input methods on the editor widget:
setAttribute(Qt::WA_InputMethodEnabled, false)
Consuming IME-related events in event() (e.g. QEvent::InputMethod , QEvent::InputMethodQuery , QEvent::RequestSoftwareInputPanel , etc.)
Calling QGuiApplication::inputMethod()->hide() in focusInEvent() / mousePressEvent()
However, the crash still occurs when clicking the editor text area.
Expected behavior When Qt Virtual Keyboard is enabled, QsciScintilla should not crash on mouse click / caret movement. If the widget does not support the virtual keyboard, it should safely ignore/refuse IME interaction instead of crashing.
Minimal reproduction steps
Additional note Standard Qt widgets like QLineEdit can work with the virtual keyboard in the same application; the issue only triggers on the QsciScintilla click/focus/caret path.