Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Reliably triggering Ubuntu 22.04 GNOME OSK from QLineEdit (Without Wayland / Without qtvirtualkeyboard)
Qt 6.11 is out! See what's new in the release blog

Reliably triggering Ubuntu 22.04 GNOME OSK from QLineEdit (Without Wayland / Without qtvirtualkeyboard)

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt6.5ubuntux11keyboardtouch screen
2 Posts 2 Posters 633 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mvsri
    wrote last edited by
    #1

    Hi everyone,

    I am developing a Qt 6.5.3 C++ Widgets application running on an Ubuntu 22.04 touchscreen IPC. Wayland is disabled (strictly using an X11/Xorg session).

    I cannot use the GPLv3-licensed qtvirtualkeyboard. I need to use Ubuntu’s native GNOME On-Screen Keyboard (OSK).

    The Issue:
    When a user taps inside a Qt QLineEdit, the default GNOME OSK behaves erratically—sometimes it pops up, but most of the time it doesn't trigger at all. This unreliability happens on a completely stock Ubuntu installation, I tried installing the "Improved OSK" GNOME extension and tested it and it's the same behaviour.

    Currently, I am using a workaround where I launch the onboard keyboard utility via QProcess on focus events. While this works, it feels like an unnecessary external dependency hack.

    Questions:

    • Is there a way to make Qt 6 text widgets properly communicate focus changes to the GNOME/X11 accessibility layer so the native OSK triggers 100% of the time?

    • What is the correct D-Bus interface/method under Ubuntu 22.04 to manually force the default GNOME keyboard to show/hide from C++?

    Any insights on bridging this Qt-to-GNOME input gap would be greatly appreciated!

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote last edited by Kent-Dorfman
      #2

      My advise would be to write your own virtual keyboard app using Qt. Since it seems you are writing a kiosk application then consider dropping gnome completely and run the app on a raw X11 session.

      Well, actually a kiosk application is one of the few places where wayland is actually appropriate since it is a single application (if you integrate the popup keyword)

      The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved