当前位置:网站首页>deepin系统中Qt5.12无法输入中文(无法切换中文输入法)解决办法
deepin系统中Qt5.12无法输入中文(无法切换中文输入法)解决办法
2022-06-13 10:06:00 【只是个~小不点】
一.出现的问题
昨天安装了过程deepin系统来进行QT开发,一切进展都还顺利,但是在输入中文时,怎么切换都无法输入,也就是无法切换中文输入法,输入法状态变为默认键盘别且切换输入法的任何操作都不起作用 。昨天头疼了一下午,都弄不得。
二.为什么会出现这种问题呢?
对于使用 fcitx 框架的中文输入法,需要手动编译 fcitx-qt5 生成中文输入法的库文件,qt里面没有配置,需要在qt的某些目录下配置好这些文件才行。
查资料看到很多人用git clone github下的下载fcitx-qt5.git,但是我的电脑不行
git clone https://github.com/fcitx/fcitx-qt5.git

回去后我就用我自己的电脑远程登录我的阿里云服务器,远程使用这个命令进行下载,下载完成后,我把下载的文件拷贝到我的电脑里,然后上传QQ邮箱。
我直接把这个插件放在网盘链接下:出现想我这种问题的,直接下载就行了
链接: https://pan.baidu.com/s/1gP1LQr_W7lR9O7x4wcgYcA
提取码: 8ypp
第二天回公司后,马上登录QQ邮箱,将fcitx-qt5,下载到deepin系统中,按照以下步骤进行编译:
对于使用 fcitx 框架的中文输入法(如搜狗输入法),需要手动编译 fcitx-qt5 生成中文输入法的库文件
三.怎么解决呢?
1. 安装 cmake,用于编译 fcitx-qt5
首先查看是否已经安装 cmake:
cmake --verison如果有显示版本信息说明已经安装,则可以到下一步;如果没有安装,则先安装:
sudo apt install cmake2. 安装 fcitx-libs-dev
sudo apt install fcitx-libs-dev3.下载完fcitx-qt5后,解压fcitx-qt5
4.进入fcitx-qt5解压目录
cd fcitx-qt55. 设置 qmake 环境变量
export PATH="$HOME/Qt/Qt5.12.0/5.12.0/gcc_64/bin":$PATH注意:具体路径根据自己安装目录确定
6. 生成makefile文件
cmake .如果出现了如下图所示的结果,就成功了,可以跳过下面的步骤

如果发生错误了,注意查看错误信息

像我的就是缺少了如图所示路径中的文件libcomposeplatforminputcontextplugin.so
我们直接去系统中找一下,看其他地方有没有
用find命令
find / -name libcomposeplatforminputcontextplugin.so
然后将找到的libcomposeplatforminputcontextplugin.so库文件拷贝到,报错提示缺少的路径中
再次执行
cmake .看看错误提示,少什么,在系统目录中用find命令找就行了,直到没有报错,如下图所示

这样就算cmake成功,成功生成makefile文件
7.编译
make
能编译到100%,说明编译成功了
我们查看ficitx-qt5的目录,发现生成了qt5和qt6两个的两个文件
因为我用的是qt5.12.0版本的Qt,所以我要用的是qt5目录下的libfcitxplatforminputcontextplugin.so库文件

8.拷贝到Qt指定的两个目录中
cp -f libfcitxplatforminputcontextplugin.so /home/yicaobao/Qt5.12.0/5.12.0/gcc_64/plugins/platforminputcontexts/cp -f libfcitxplatforminputcontextplugin.so /home/yicaobao/Qt5.12.0/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts注意:具体路径根据自己安装目录确定
ok, 一切打开告成!
9. 重启Qt,即可

边栏推荐
猜你喜欢

Oracle custom data type question

格林纳达代表团团长孙宇晨出席WTO MC12 强调发展数字经济

go-zero微服务实战系列(三、API定义和表结构设计)
![[image denoising] image denoising based on MATLAB Gaussian + mean + median + bilateral filtering [including Matlab source code 1872]](/img/8d/3c2664738ad5ab11a35b7aadc8eb88.png)
[image denoising] image denoising based on MATLAB Gaussian + mean + median + bilateral filtering [including Matlab source code 1872]

Information document management and configuration management

Write pytoch model in five minutes

Classes and objects -- object model and this pointer

Node-RED系列(二四):在Node-RED中使用mysql节点实现数据库的增删改查
![[51nod 3062] n queen problem V2 [bit operation DFS]](/img/ca/4e3b01c371557d8214da6a97eba3ac.jpg)
[51nod 3062] n queen problem V2 [bit operation DFS]

Consolas-with-Yahei
随机推荐
Sunyuchen, head of Grenada delegation, attended the WTO MC12 and emphasized the development of digital economy
Go path package
Exercise 7-7 string replacement (15 points)
关于指令集位数,指令构架位数简述
23. Lottery
C# Oracle 多表查询
Webrtc server engineering practice and optimization exploration
Design of simple electronic clock based on single chip microcomputer
格林纳达代表团团长孙宇晨出席WTO MC12 强调发展数字经济
周末赠书:Power BI数据可视化实战
MySQL monitoring tool PMM, let you go to a higher level (Part 2)
[poj1845] sumdiv [number theory]
VDD,DVDD,AVDD,VCC,AFVDD,DOVDD,IOVDD
C language structure
[51nod p2106] an odd number of times [bit operation]
信息文档管理与配置管理
IDEA 续命插件
Classes and objects - initialization and cleanup of objects
Learning makefile with me
MySQL事务隔离级别和MVCC