Workaround:
1, installation Fcitx-frontend-qt5
[Email protected]:/home/he# sudo apt-get install fcitx-frontend-qt5
2. Copy the installed FCITX-FRONTEND-QT5 to the QT installation directory
Typically, FCITX-FRONTEND-QT5 is in the following directory path (the file installation path can be seen with the command dpkg-l package name ):
/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
Copy the file to
/home/he/qt5.5.1/tools/qtcreator/bin/plugins/platforminputcontexts/
And
/home/he/qt5.5.1/5.5/gcc_64/plugins/platforminputcontexts/
In
CP LIBFCITXPLATFORMINPUTCONTEXTPLUGIN.SO/HOME/HE/QT5.5.1/TOOLS/QTCREATOR/BIN/PLUGINS/PLATFORMINPUTCONTEXTS/CP libfcitxplatforminputcontextplugin.so/home/he/qt5.5.1/5.5/gcc_64/plugins/platforminputcontexts/
Re-open Qtcreator, finally can input Chinese.
#include <iostream>using namespace Std;int main () {cout << "Hello Hello world!" << Endl; return 0;}
If still not, restart the computer, and then open the Qtcreator, you can
Reference blog:
http://my.oschina.net/u/219482/blog/341452
This article is from the "10628473" blog, please be sure to keep this source http://10638473.blog.51cto.com/10628473/1767599
QT5.5 cannot input Chinese when writing programs under Ubuntu system