With the help of wasm, we are able to port the apps written by Qt to the browser, this save us a lot of times in many cases, but same as android/ios, wasm of Qt do have their limitations and the Qt company do not have much interest to fix those issues, I guess this is because major market of Qt are automobile, IOT etc, but not mobile phone or browser.
In this post I would like to write down how do I get around the issue 78826--Cannot enter non ascii characters to the TextField and QLineEdit from browser(wasm).
1.Cannot access system font
After that, add the zip file into the Qt resource system, load it and set it as the font of the QPlainTextEdit.
2. Cannot enter Chinese from QPlainTextEdit
This issue is quite annoying, but we do have a "stupid" solution to overcome this problem. The way I found is use the prompt dialog of js library to input the text. The library I pick called bootbox. You can get around this limit by following steps
a. Use js to enter the text
b. Call the js function from c++
c. Include js script and css in generated html file
To be honest, this is really troublesome, and I hope that one day this shortcoming can be resolved.