How to use Qt open source embedded Chinese input method syszuxpinyin
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!