QScintilla and QT_IM_MODULE

Phil Thompson phil at riverbankcomputing.com
Sat Jul 2 22:13:21 BST 2022


On 02/07/2022 13:17, Alexander Bruy wrote:
> Hi,
> 
> I'm trying to use QScintilla via Python on Windows 10. I have a
> standard Qt environment variable QT_IM_MODULE=qtvirtualkeyboard
> defined at the
> system level.
> 
> In this environment whenever I try to instantiate QScintilla, it
> crashes or hangs for a while and then crashes. If
> QT_IM_MODULE=qtvirtualkeyboard is not set, everything works fine. Here
> is the stacktrace I was able to get:
> 
> QsciScintillaBase::inputMethodQuery :
> QsciScintillaBase::inputMethodQuery :
> QsciScintillaBase::inputMethodQuery :
> PyInit__gui :
> QWidget::event :
> QFrame::event :
> QAbstractScrollArea::event :
> PyInit__gui :
> QApplicationPrivate::notify_helper :
> QApplication::notify :
> QgsApplication::notify :
> QCoreApplication::notifyInternal2 :
> QtVirtualKeyboard::PlatformInputContext::sendEvent :
> QVirtualKeyboardInputContextPrivate::update :
> QtVirtualKeyboard::PlatformInputContext::update :
> QGuiApplicationPrivate::_q_updateFocusObject :
> QObject::qt_static_metacall :
> QWindow::focusObjectChanged :
> QWidgetPrivate::updateFocusChild :
> QWidget::setFocus :
> PyInit_QtWidgets :
> PyArg_ParseTuple_SizeT :
> PyEval_EvalFrameDefault :
> PyFunction_Vectorcall :
> PyFloat_FromDouble :
> PyVectorcall_Call :
> PyObject_Call :
> PyInit_QtCore :
> PyInit_QtCore :
> PyInit_QtCore :
> PyInit_QtCore :
> QObject::event :
> QApplicationPrivate::notify_helper :
> QApplication::notify :
> QgsApplication::notify :
> QCoreApplication::notifyInternal2 :
> QCoreApplicationPrivate::sendPostedEvents :
> qt_plugin_query_metadata :
> QEventDispatcherWin32::processEvents :
> qt_plugin_query_metadata :
> QEventLoop::exec :
> QCoreApplication::exec :
> main :
> BaseThreadInitThunk :
> 
> And here is my code
> 
> from PyQt5.QtWidgets import QApplication
> from PyQt5.Qsci import QsciScintilla
> app = QApplication([])
> sci = QsciScintilla()
> sci.show()
> app.exec_()
> 
> I'm using Python 3.9.5, Qt 5.15.3, QScintilla 2.13.1
> 
> Any ideas what can be wrong? Are there any plans to have QScintilla
> work with Qt virtualkeyboard?

No plans.

Phil


More information about the QScintilla mailing list