Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use Qt open source embedded Chinese input method syszuxpinyin

Shulou Source: shulou.com Published: 2022-06-01 13:17:28 09月26日 Update

This article mainly shows you "Qt open source embedded Chinese input method syszuxpinyin how to use", the content is easy to understand, clear, hope to help you solve doubts, the following let Xiaobian lead you to study and learn "Qt open source embedded Chinese input method syszuxpinyin how to use" this article.

Syszuxpinyin is an open source embedded system Chinese input method based on Qt. This input method realizes the input of English, characters, numbers and Chinese characters. The official Chinese character input method is GB2312 coding. Here I modify it to UTF-8 coding. Now all Qt versions use UTF-8 coding.

This input method is also relatively easy to use, first of all, compile it into a dynamic library:

Qmake

Make

Generate a dynamic library:

Just put the dynamic library into the default library file directory of qt.

Add the following code to the program in qt:

Include header files:

# ifdef DEVICE

# include

# include "syszuxim.h"

# ifdef DEVICE

QWSServer::setCursorVisible (false)

QWSInputMethod* im = new SyszuxIM

QObject::connect (pEventFilter, SIGNAL (noOperationDetect ()), im, SLOT (OnNoOpreationTimeOut ())

QWSServer::setCurrentInputMethod (im)

# endif

Since QWSServer is not supported when compiling on PC, I have added a compilation switch here

In the input method code, the signal to get the focus has been connected, so when the input box on the interface gets the focus, the input method will be automatically displayed.

It is easy to use. Here is a picture of the input method.

This picture is used in my project, so I added the background image and modified part of the layout:

The above is all the contents of the article "how to use Qt open source embedded Chinese input method syszuxpinyin". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Input input method embedded Chinese content dynamic picture article coding code focus UTF-8 Chinese characters learning help compilation editing signals characters official Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia Linux MySQL Shulou Information