Qt5-Eclipse with Chinese Input in QT creator

Source: Internet
Author: User

After installing the plugin, it took a day to get involved. You can barely write a program.

When configuring eclipse, pay attention to the following two points:

1) Add QT + = widgets to the project name. Pro. Of course, write it after QT + = core GUI. If this parameter is not added, an error occurs during the link.

2) qt5 differs from qt4 in that it places frequently-used components in the qtwidgets folder. It seems to have been placed in qtgui before. Therefore, when using an earlier version of Eclipse plug-in (there is no qt5 Eclipse plug-in yet), the generated code is problematic. We need to change the include statement of the generated code.

After installing the QT creator, you cannot enter Chinese characters and get it out after two days. If you find that you do not solve this problem, you cannot learn QT with peace of mind.

The default ibus input method is used. After one day of hard work, I changed fcitx, but I still didn't get it out.

In the morning, I re-installed ibus and uninstalled fcitx.

In fact, you only need to add the following three sentences to/etc/environment:

#Input Methodexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibus

Others are added to/etc/profile or ~ /. In bashrc, you can add all of them, but you must ensure that the user can log on to any terminal with the following results:

freeitdog@freeitdog-K43TA:~$ echo $GTK_IM_MODULE ibusfreeitdog@freeitdog-K43TA:~$ echo $XMODIFIERS @im=ibusfreeitdog@freeitdog-K43TA:~$ echo $QT_IM_MODULE ibusfreeitdog@freeitdog-K43TA:~$ 

Sometimes, you may find that the setting is only valid for the current terminal.

I don't know if fcitx is the same fashion. I only have one computer.

Another point is to set the default system input method:

im-switch -c

It seems that Linux is not suitable for beginners like me. There are too many fragmented issues.

Next figure:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.