[immodule-qt] Does QT 4 beta 1 support IM modules
kaminmat at cc.rim.or.jp
Fri Feb 4 07:28:21 EET 2005
On Friday 04 February 2005 01:53, Lars Knoll wrote:
> I'd like to move the IM switching into Qt itself (I'll try to work on
> implementing this next week). But this would not affect the API.
I also think so.
BTW, I will also consider a simple switching function
which accords with your intention.
> > In the sub class of QMultiInputContext, the function to rebuild
> > QInputMethodEvent may be needed using QInputMethodEvent which slave
> > generated.
> > By implementing this function, usefulness of QMultiInputMethod increases.
> But to do so, you would need a way to block the event from being delivered
> to the widget from the slave input context. Currently the slave context
> would always directly deliver the event to the widget.
It is right.
Well, I thought other solution. imEventReceived slot is added
to QInputContext, and QInputContext imEventGenerated signal is
connected to imEventReceived. Moreover, QInputContext::sendEvent()
emit imEventGenerated signal by default.
What do you think of this?
: QObject(*new QInputContextPrivate, parent)
QObject::connect( this, SIGNAL(imEventGenerated(QObject
*,QInputMethodEvent *)) );
void QInputContext::imEventReceived(QObject *client, QInputMethodEvent *event)
void QInputContext::sendEvent(const QInputMethodEvent &event)
QWidget *focus = focusWidget();
emit imEventGenerated(focus, &event);
Daisuke Kameda <kaminmat at cc.rim.or.jp>
More information about the immodule-qt