当前位置:网站首页>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 cmake
2. 安装 fcitx-libs-dev
sudo apt install fcitx-libs-dev
3.下载完fcitx-qt5后,解压fcitx-qt5
4.进入fcitx-qt5解压目录
cd fcitx-qt5
5. 设置 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,即可
边栏推荐
- Tree and binary tree: operation and storage structure of tree
- 【图像去噪】基于matlab高斯+均值+中值+双边滤波图像去噪【含Matlab源码 1872期】
- Trees and binary trees: Construction of binary trees
- Double carbon in every direction: green demand and competition focus in the calculation from the east to the West
- Programming principles
- [51nod P3210] binary statistics
- go-zero微服务实战系列(三、API定义和表结构设计)
- SQL Server创建windows登录账户找不到用户或组
- 说说MySQL索引机制
- [51nod p2527] or and sum [bit operation]
猜你喜欢
matlab轮毂电机分析模糊pid控制垂向振动分析
[51nod p2106] an odd number of times [bit operation]
Information document management and configuration management
【图像去噪】基于matlab高斯+均值+中值+双边滤波图像去噪【含Matlab源码 1872期】
The rise of cloud computing enterprises and the shaking of Oracle database market dominance
二叉树简介
【 ssl2 ⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶⁶83
Weekend book: power BI data visualization practice
基于SSM实现水果商城批发平台
MySQL monitoring tool PMM, let you go to a higher level (Part 2)
随机推荐
MOOC week 8 programming exercise 1
Classes and objects -- encapsulation
Sequential representation of linear tables
Weekend book: power BI data visualization practice
List list
Exercise 7-7 string replacement (15 points)
Classes and objects -- polymorphic
Trees and binary trees: Construction of binary trees
Node red series (27): instructions for S7 node of the extension node
Leetcode (question 15) - sum of three numbers
冗余码题型--后面加0的区别
C# 11 新特性:接口中的静态抽象成员
Classes and objects -- Inheritance
36 krypton launched | built domestic actuarial forecasting engine and other products, and "Shenzhen light technology" completed three consecutive rounds of financing
Cynthia项目缺陷管理系统
苹果放大招!这件事干的太漂亮了……
Classical convolutional neural network model
Webrtc server engineering practice and optimization exploration
多线程 从UE4的无锁队列开始 (线程安全)
C Oracle multi table query