日曜日, 1月 13, 2008

InputContext and IME

I had such an unpleasant time looking through pages about IME -- as if everybody is using languages that use alphabets only. But for the most of us who use not only alphabets but also other scripts, here are some pieces of advice. Just a few lines -- but you can control IME from Java applications.

InputContext inputContext=null;
inputContext=frame.getInputContext();
inputContext.selectInputMethod(Locale.JAPAN);

This turns on Japanese IME. If you alter the locale to Locale.TAIWAN, or instantiate the class with language and country codes as:
Locale locale=new Locale("hi","IN");

then you can turn on the IME of your choice from your Java application.

Qt: 外部プログラムを起動する

  Qt/C++ のアプリは、外部へ直接アクセスできます。これはネットアプリでは不可能な Qt のメリットです。 外部プログラムを起動することもできます。QProcess::startDetached() を使うと独立したプロセスを立ち上げることができます。 この QProces...