QTVirtualKeyboard not appearing on embedded application (QT5)
-
Hi everyone,
I'd like to address an issue I've been encountering while working with an embedded application built using Yocto from the Kirkstone branch. Hopefully, someone can assist me or share their insights on this matter.
My problem is that the QTVirtualKeyboard does not appear when I touch a text field using a touchscreen. Although touch functionality works, multitouch, and gestures are also supported, but the keyboard doesn't display at all. While debugging, I noticed that the application doesn't set the appropriate focusObject.
Interestingly, when I connect a mouse and click on the text field, the virtual keyboard appears. After such an action, the keyboard also shows up when I use the touchscreen.
My application runs on the XCB platform and utilizes X11, with libinput as the touchscreen driver.
I would greatly appreciate any suggestions or tips on how to resolve this issue and configure the application to display the virtual keyboard correctly when using the touchscreen.
touchscreen click logs
qt.virtualkeyboard: QVirtualKeyboardInputContextPrivate::registerInputPanel(): InputPanel_QMLTYPE_11_QML_60(0x14f17b0) qt.virtualkeyboard: QVirtualKeyboardInputContextPrivate::setLocale(): "en_GB" qt.virtualkeyboard: PlatformInputContext::setLocale(): QLocale(English, Latin, United Kingdom) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QQuickRootItem(0x13f9380) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll)
mouse click logs
qt.virtualkeyboard: QVirtualKeyboardInputContextPrivate::registerInputPanel(): InputPanel_QMLTYPE_19_QML_60(0xb5e9a0) qt.virtualkeyboard: QVirtualKeyboardInputContextPrivate::setLocale(): "en_GB" qt.virtualkeyboard: PlatformInputContext::setLocale(): QLocale(English, Latin, United Kingdom) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QQuickRootItem(0xa2db10) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: PlatformInputContext::commit() qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::showInputPanel() qt.virtualkeyboard: PlatformInputContext::setFocusObject(): TextArea_QMLTYPE_12(0xb12850) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: QVirtualKeyboardInputContextPrivate::setFocus(): true qt.virtualkeyboard: QVirtualKeyboardInputEngine::setInputMethod(): QtVirtualKeyboard::PlainInputMethod(0xb8bc20) qt.virtualkeyboard: QVirtualKeyboardInputEngine::inputModesChanged(): QList(QVirtualKeyboardInputEngine::InputMode::Latin, QVirtualKeyboardInputEngine::InputMode::Numeric) qt.virtualkeyboard: QVirtualKeyboardInputEngine::setInputMode(): QVirtualKeyboardInputEngine::InputMode::Latin qt.virtualkeyboard: QVirtualKeyboardInputContext::setAnimating(): true qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImCurrentSelection)
Debuging the function qt.virtualkeyboard: evaluateInputPanelVisible shows that m_focusObject is null with touch screen and inputMethodAccepted is false.
Thank you in advance for any assistance!
-
@Ronel_qtmaster Hi! Thanks for your suggestion. I might consider trying the dunfell branch, but it's worth mentioning that dunfell is gradually losing support. Or you ment to change only qt to dunfell?
Additionally, could you please share if you made any modifications to the package configurations in qtbase, qtvirtualkeyboard, etc., during the Yocto configuration? Understanding any customizations you've applied could provide valuable insights into resolving similar issues.