安装 QT 5.9.0开发环境_解决中文输入
Tofloor
poster avatar
comzhong
deepin
2017-07-03 22:59
Author
本帖最后由 comzhong 于 2017-9-24 10:52 编辑

1.下载 QT 最新版 run 格式安装包

http://download.qt.io/official_releases/qt/

我安装的是这货:http://download.qt.io/official_releases/qt/5.9/5.9.0/qt-opensource-linux-x64-5.9.0.run

2.运行 run 安装包,一路下一步




3.安装 gcc g++ gdb cmake git gl
  1. #!/bin/bash

  2. #安装:build-essential gcc g++ gdb cmake git gl
  3. sudo apt-get update
  4. sudo apt-get install build-essential gcc g++ gdb cmake git
  5. sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev

  6. sudo ln -s /usr/lib/i386-linux-gnu/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
  7. sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
Copy the Code

4.中文输入

Qt 5.9.1 中文输入:fcitx-qt5.9.1.zip

Qt 5.9.0 中文输入:fcitx-qt5.9.0.zip

Qt 5.8.0中文输入
  1. #!/bin/bash

  2. userdir=`env | grep ^HOME= | cut -c 6-`
  3. qt5Creator=${userdir}/Qt5.8.0/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
  4. qt5gcc_64=${userdir}/Qt5.8.0/5.9/gcc_64/plugins/platforminputcontexts
  5. libfcix=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

  6. sudo apt-get install fcitx-libs-qt5

  7. sudo cp $libfcix ${qt5Creator}
  8. sudo cp $libfcix ${qt5gcc_64}
  9. sudo chmod +x ${qt5Creator}/libfcitxplatforminputcontextplugin.so
  10. sudo chmod +x ${qt5gcc_64}/libfcitxplatforminputcontextplugin.so
  11. sudo chmod 777 ${qt5Creator}/libfcitxplatforminputcontextplugin.so
  12. sudo chmod 777 ${qt5gcc_64}/libfcitxplatforminputcontextplugin.so
Copy the Code

Reply Favorite View the author
All Replies
avatar
mrli_deep
deepin
2017-07-04 03:26
#1
?安装好之后,会不会wiznote可以用了,网易云音乐桌面歌词乱码?
Reply View the author
avatar
comzhong
deepin
2017-07-04 04:13
#2
本帖最后由 comzhong 于 2017-7-3 21:12 编辑
https://bbs.deepin.org/post/141963
?安装好之后,会不会wiznote可以用了,网易云音乐桌面歌词乱码?

你是来砸场子的吗 ,这是装来编程的!
Reply View the author
avatar
MeowSprite
deepin
2017-07-04 05:02
#3
https://bbs.deepin.org/post/141963
?安装好之后,会不会wiznote可以用了,网易云音乐桌面歌词乱码?

不会,因为qt的二进制安装包只是把qt的所有库安装在指定的文件夹,而不是直接安装在系统库中。
Reply View the author
avatar
mrli_deep
deepin
2017-07-04 17:06
#4
https://bbs.deepin.org/post/141963
你是来砸场子的吗  ,这是装来编程的!

我的有问题,所以问问会不会出现
Reply View the author
avatar
comzhong
deepin
2017-07-05 01:40
#5
https://bbs.deepin.org/post/141963
我的有问题,所以问问会不会出现





你说那些和这个没什么关系
Reply View the author
avatar
comzhong
deepin
2017-07-15 17:35
#6
编译出适合Qt5.9.0的libfcitxplatforminputcontextplugin.so
Reply View the author
avatar
srwth
deepin
2018-01-09 05:04
#7
qt5.10经测试可以使用。不用重新编译了。谢谢
Reply View the author
avatar
9***8@qq.com
deepin
2018-01-09 08:58
#8
QT类程序,乃至QT本身,无法输入中文的话,只需要将对应的『输入法』动态链接库丢到你的发行版的QT5库中即可。

也就是说,你只需要将『libfcitxplatforminputcontextplugin.so  』放到如下的目录里就成了。

完全不需要安装『QT开发环境』,才能解决,因为根本用不到它。

libfcitxplatforminputcontextplugin.so  —— 这个东西,是在编译fcitx时,由fcitx程序生成的,当且仅当需要编译这个*.so库时,才需要安装『开发环境』。

比较靠谱的发行版,都会预装输入法框架的QT动态链接库。比如deepin,你会用如下命令,看到内置在系统中的*.so。

~$ ls /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/

libcomposeplatforminputcontextplugin.so  # 系统输入法框架库
libibusplatforminputcontextplugin.so # ibus库
libfcitxplatforminputcontextplugin.so    # fcitx库
libyongplatforminputcontextplugin.so  # yong库



Reply View the author
avatar
comzhong
deepin
2018-01-09 09:15
#9
lineme 发表于 2018-1-9 00:58
QT类程序,乃至QT本身,无法输入中文的话,只需要将对应的『输入法』动态链接库丢到你的发行版的QT5库中即 ...

你看懂这篇帖子的目的没有?是为了安装 QT 5.9.0开发环境并解决Qt中文输入,而不是为了解决中文输入而安装Qt。
Reply View the author
avatar
9***8@qq.com
deepin
2018-01-09 09:20
#10
https://bbs.deepin.org/post/141963
你看懂这篇帖子的目的没有?是为了安装 QT 5.9.0开发环境并解决Qt中文输入,而不是为了解决中文输入而安 ...

如果系统库目录下的的QT5库里有fcitx的动态链接库,不会无法输入中文。
如果编译QT程序,只需要把系统库的fcitx输入法框架动态链接库加到QtCreator的lib目录下即可。
QT输入法动态链接库向下兼容,低版本即可。
Reply View the author
avatar
comzhong
deepin
2018-01-09 09:30
#11
lineme 发表于 2018-1-9 01:20
如果系统库目录下的的QT5库里有fcitx的动态链接库,不会无法输入中文。
如果编译QT程序,只需要把系统库 ...

当时就是仓库的fcitx的动态链接库 不能Qt 5.9.0,所以才有这篇帖子。
Reply View the author
Comments
lineme
2018-01-09 09:34
deepin编译失误,现在已经纠正了。
avatar
156******44
deepin
2018-06-24 02:02
#12
亲测5.9.1的fcitx     5.1.1可用
Reply View the author