如何在QT5.6.0上安装中文输入法 及引申出来的问题
来源:互联网 发布:网络存在劫持 编辑:程序博客网 时间:2024/05/16 14:45
在Qt5.3之前,我发布过解决办法 解决Qt5 Creator无法切换输入法(fcitx),不能录入汉字问题,Qt5.4以及Qt5.5,旧办法失效,原因是Qt5.4后对之前Qt5版本不再二进制兼容,libfcitxplatforminputcontextplugin.so 需要编译最新的fcitx-qt5。如果你懒得自己编译,可以下载我编译的 libfcitxplatforminputcontextplugin.so
看fcitx-qt5项目的更新日志,是在1.0.3版本时解决的这个问题,写本篇博客时,我git clone到的是1.0.4版本。
编译fcitx-qt需要cmake,安装cmake命令,如果已经安装,请略过。
sudo
apt-get
install
cmake
安装 fcitx-libs-dev
sudo
apt-get
install
fcitx-libs-dev
设置qmake的环境变量:
export
PATH=
"/home/jeffrey/Qt5.6.0/5.6/gcc_64/bin"
:$PATH
下载fcitx-libs源码:
git clone git@github.com:fcitx
/fcitx-qt5
.git
这里有可能不能git clone提示权限问题,那么你要下载一个ssh(apt-get install ssh)具体方法见
编译方法:
cd
fcitx-qt5
cmake .
make
sudo
make
install
最后把编译得到 libfcitxplatforminputcontextplugin.so 拷贝到 Qt5.5安装目录的 Tools/QtCreator/bin/plugins/platforminputcontexts
Qt5.6的目录是 Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
大功告成!
CMake Error at CMakeLists.txt:8 (find_package):
Could not find a package configuration file provided by "ECM" (requested
version 1.4.0) with any of the following names:
ECMConfig.cmake
ecm-config.cmake
Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
to a directory containing one of the above files. If "ECM" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
遇到上述错误处里方法:
这个页面 https://launchpad.net/ubuntu/+source/extra-cmake-modules/1.4.0-0ubuntu1 下载 extra-cmake-modules_1.4.0.orig.tar.xz
解压后:
cd
extra-cmake-modules-1.4.0
cmake .
make
sudo
make
install
CMake Error at /home/lieefu/Qt5.5.0/5.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "GL/gl.h" in "/usr/include/libdrm".
处里方法:
sudo
apt-get
install
libgl1-mesa-dev libglu1-mesa-dev
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- Could NOT find XKBCommon_XKBCommon (missing: XKBCommon_XKBCommon_LIBRARY XKBCommon_XKBCommon_INCLUDE_DIR)
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find XKBCommon (missing: XKBCommon_LIBRARIES XKBCommon) (Required
is at least version "0.5.0")
处里方法:
wget http:
//xkbcommon
.org
/download/libxkbcommon-0
.5.0.
tar
.xz
tar
xf libxkbcommon-0.5.0.
tar
.xz
.
/configure
—prefix=
/usr
—libdir=
/usr/lib/x86_64-linux-gnu
—disable-x11
make
sudo
make
install
编译libxkbcommon用到yacc,如果没有这个命令,会遇到下面的错误,yacc在 bison软件包中
sudo
apt-get
install
bison
YACC src/xkbcomp/parser.c
./build-aux/ylwrap: line 176: yacc: command not found
make: *** [src/xkbcomp/parser.c] Error 127
- 如何在QT5.6.0上安装中文输入法 及引申出来的问题
- 在ubuntu下,把安装的中文输入法切换出来
- 在ubuntu下,把安装的中文输入法切换出来
- 在ubuntu下,把安装的中文输入法切换出来
- 在ubuntu下,把安装的中文输入法切换出来
- Qt5在Arm板上中文的显示问题
- 关于linux下Qt5.7.0安装中文输入法无法显示的问题
- 中文手写输入法在iOS8.1上的崩溃问题
- 在virtualbox里把Ubuntu下安装的中文输入法切换出来
- 在Debian4上安装中文输入法
- 在Ubuntu12.04上安装中文输入法
- 在Ubuntu12.04上安装中文输入法
- 如何在ubuntu中安装中文输入法
- 如何在Ubuntu中安装中文输入法
- 如何在Fedora10下安装中文输入法
- 如何在Ubuntu下安装中文输入法
- 如何在Ubuntu中安装中文输入法 .
- 如何在ElementaryOS下安装中文输入法
- supervisor无法正常运行Caused by: java.io.EOFException: null
- ambari管理界面服务显示问题
- Linux下Squid代理服务器的安装与配置,带用户认证功能
- ambari操作节点supervisor无法正常启动
- php会话控制(session与cookie)
- 如何在QT5.6.0上安装中文输入法 及引申出来的问题
- Eclipse查看jar包源码
- Datanode节点一块硬盘故障处理
- storm supervisor启动失败 Error on initialization of server mk-supervisor
- Hive0.13升级到hive0.14步骤
- AOP各种的实现
- 使用IO流无法删除本地文件的原因
- 指定hive列队
- Java类的加载,以及静态内部类的问题。