[immodule-qt] Current Qt 4 status

Lars Knoll lars at trolltech.com
Sun Jan 2 15:51:00 EET 2005


On Sunday 02 January 2005 14:35, Daisuke Kameda wrote:
> Lars Knoll <lars at trolltech.com> wrote:
> > > Suppose an input method that has a status widget always
> > > shown. To satisfy the user interface requirements of the input
> > > method, the status widget has to follow cursor even if preedit
> > > does not exist.
> > >
> > > To implement such behavior, There are two ways.
> > >
> > > 1. Invoke inputMethodQuery() at every opportunity (such as
> > >    filterEvent() and mouseHandler()) to detect change of cursor
> > >    position in the input widget
> > >
> > > 2. Invoke inputMethodQuery() when the input context has been
> > >    notified about something changed in the input widget
> > >
> > > Lars's API design implies 1, but I prefer 2.
> >
> > You're right. We've gone through the problem here again, and it looks
> > like we can not avoid having a notification from the input widget for
> > this. There are two places this is needed: input method support and
> > accessibility. So we will add some notification method again.
>
> I found cursorPositionChanged signal, but I couldn't find the code which
> has connected this signal to the slot.
>
> Is your solution using this signal?
>
> If the answer is yes, are you going to leave connection with this signal
> to the developer of IM? I think that it should be realized inside Qt.

The method you need to call in an input widget is called 
QWidget::updateMicroFocus(). The main difference to before is that the method 
does not taka an argument. Instead the input method (or the accessibility 
framework) can query all the need to know with inputMethodQuery() afterwards.

QWidget::updateMicroFocus() calss QInputContext::update() automatically, which 
you can reimplement in your input method.

Cheers,
Lars



More information about the immodule-qt mailing list