Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9, 5.11, 5.12, 5.14.0 Beta3
-
Ubuntu 18.04
Description
Qt Virtual Keyboard's desktop integration method should work when using wayland with both Qt Quick and Qt Widgets applications. Using the pure-qml example as a compositor, I am able to get the virtual keyboard input panel to show up when clicking on e.g. QLineEdit, but there are a couple of issues:
- When attemping to click on any key, the input panel (keyboard) closes.
- On the dev branch, it’s not possible to get the keyboard to open a second time. This works with 5.11.
Here's the output from the qt.virtualkeyboard logging category when interacting with a QLineEdit:
Starting /home/mitch/dev/temp/widgets-qt5_dev_debug-Debug/widgets... Using Wayland-EGL Using the 'xdg-shell-v6' shell integration // Clicking in input field: qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QLineEdit(0x560e8857cfa0, name = "lineEdit") qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: InputContext::setFocus(): true qt.virtualkeyboard: InputEngine::setInputMethod(): QtVirtualKeyboard::PlainInputMethod(0x560e88732b20) qt.virtualkeyboard: InputEngine::setInputMode(): QtVirtualKeyboard::InputEngine::InputMode(Latin) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QLineEdit(0x560e8857cfa0, name = "lineEdit") qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: InputContext::setLocale(): "en_GB" qt.virtualkeyboard: PlatformInputContext::setLocale(): QLocale(English, Latin, UnitedKingdom) qt.virtualkeyboard: InputEngine::setInputMode(): QtVirtualKeyboard::InputEngine::InputMode(Latin) qt.virtualkeyboard: PlatformInputContext::showInputPanel() qt.virtualkeyboard: DesktopInputPanel::repositionView(): QRect(0,0 1024x760) qt.virtualkeyboard: InputContext::setAnimating(): true qt.virtualkeyboard: InputContext::setAnimating(): false // Closing input panel: qt.virtualkeyboard: PlatformInputContext::commit() qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::commit() qt.virtualkeyboard: PlatformInputContext::hideInputPanel() qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QQuickRootItem(0x560e885910e0) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: InputContext::setFocus(): false // Attempting to open input panel again: qt.virtualkeyboard: PlatformInputContext::commit() qt.virtualkeyboard: PlatformInputContext::commit() qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QObject(0x0) qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QLineEdit(0x560e8857cfa0, name = "lineEdit") qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll) qt.virtualkeyboard: InputContext::setFocus(): true qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle) qt.virtualkeyboard: PlatformInputContext::setFocusObject(): QLineEdit(0x560e8857cfa0, name = "lineEdit") qt.virtualkeyboard: PlatformInputContext::update(): QFlags<Qt::InputMethodQuery>(ImQueryAll)
I believe that http://code.qt.io/cgit/qt/qtvirtualkeyboard.git/tree/src/virtualkeyboard/desktopinputpanel.cpp would be the relevant place for any changes needed to get this to work.
Steps to reproduce:
- Clone and build qtvirtualkeyboard and qtwayland
- Build the pure-qml example.
- Run it to start the compositor: QT_XCB_GL_INTEGRATION=xcb_egl ./pure-qml
- Run a widgets application that contains a text input with QT_IM_MODULE=qtvirtualkeyboard
- Click on the text input to get the virtual keyboard to show
- Try to press a key; the keyboard will close
- Click on the text input again; the keyboard will not show
Attachments
Issue Links
- depends on
-
QTBUG-69539 QtWayland platform plugin does not implement WindowDoesNotAcceptFocus
- Reported
- relates to
-
QTBUG-56918 When the keyboard is shown for a text field in a modal popup then it will not be usable
- Closed
-
QTBUG-71909 Qt setWindowFlags WindowDoesNotAcceptFocus not working on Wayland
- Closed
- resulted in
-
QTBUG-69539 QtWayland platform plugin does not implement WindowDoesNotAcceptFocus
- Reported