Qt / KDE and Skim / Xim
hephooey_dev at fastmail.fm
Mon May 28 09:28:44 BST 2007
On Monday 28 May 2007, Thomas Zander wrote:
> in KOffice I need to port/implement the input method code to allow people
> to input Chinese or even to input normal composited characters.
> In my kubuntu kde3 I have a context menu in kmail and in Qts text fields
> to select the input method. "Select Input Method" with submenu items
> like "XIM" and "scim".
> Using this menu is essential to start typing in Chinese, for example.
Actually this menu is only useful when you want to use a non-default immodule,
and only qt with the immodule patch have this menu. For standard qt, it just
use the XIM protocol. Typically user just press "Ctrl+Space" to trigger the
input method and input Chinese.
> I'm wondering how to do that in KDE in general and in Qt4 when I inherit
> from QWidget in particular.
> I've been googling for some hours and reading sources as well. No luck so
I did not fully understand what you are trying to do, since most Qt4 widgets
already have internal immodule support. If you want some non standard widget
to accept composited characters input, you should
implement "inputMethodEvent" and "inputMethodQuery". When I did this a few
month ago, there was few documents about how to implement "inputMethodQuery",
so I just copied some code from QLineEdit, and it appears to be working
More information about the kde-core-devel