ubuntu16.04~qt 5.8无法输入中文

编译fcitx-qt需要cmake,安装cmake命令,如果已经安装,请略过。

sudo apt-get install cmake
安装 fcitx-libs-dev
sudo apt-get install fcitx-libs-dev

  设置qmake的环境变量(这个要根据各人的电脑和qt版本进行设置):

export PATH="/home/innovation/Qt5.8.0/5.8/gcc_64/bin":$PATH
下载fcitx-libs源码:
git clone git@github.com:fcitx/fcitx-qt5.git

这一步要是没设置git可能下载不下来,可以直接去:github.com/fcitx/fcitx-qt5.git下载下来

编译方法:

cd fcitx-qt5
cmake .
make
sudo make install

编译成功之后,将编译得到的libfcitxplatforminputcontextplugin.so 文件拷贝到Qt的按装目录下

Tools/QtCreator/bin/plugins/platforminputcontexts 或Tools/QtCreator/lib/Qt/plugins/platforminputcontext

之中,两个目录由安装情况而定,有的会是第一个路径,有的则是第二个路径,然后再继续将这个文件放在Qt5.6.1/5.6/gcc_64/plugins/platforminputcontexts之下 最后重启Qt或则重启电脑则可以了.

posted @ 2017-03-14 02:00  INnoVation-V2  阅读(865)  评论(1编辑  收藏  举报