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. IME popup placement on Ubuntu 16.04 using iBus
Forum Updated to NodeBB v4.3 + New Features

IME popup placement on Ubuntu 16.04 using iBus

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 200 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.
  • R Offline
    R Offline
    RichardSlade
    wrote on last edited by RichardSlade
    #1

    Hi everyone,

    My issue is the placement of the IME popup when using iBus as the IME for Ubuntu 16.04. I will try to give some context. The app I am working on consists of a widget that acts as a graphical context to stream video. If the OS that the app is running on has a different input method selected i.e Chinese (Pinyin) (IBus) then I am not able to set the position of the popup for character selection.

    My implementation works for Windows by recording the last clicked mouse position and reporting that as the value for the query to Qt::ImCursorRectangle, which is requested in the overridden virtual method QWidget::inputMethodQuery(). When using this method the popup is placed correctly below the position of the last mouse click.

    When testing the app under Ubuntu the function QWidget::inputMethodQuery() is never called by QGuiApplication and so I can never provide the position for the popup to be drawn. I have also tried setting the input item rectangle using QGuiApplication::inputMethod()->setInputItemRectangle(rect); but this also doesn't work.

    I'm out of ideas at the moment as the problem seems to be with the different behaviours of the platform integrations in Qt (QIBusPlatformInputContext and QWindowsInputContext).

    I've also considered spinning up my own QtVitualKeyboard but would like to avoid this if possible as it would be nice to just use the OS's IME.

    Any advice would be appreciated.

    Thanks,
    Richard

    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