therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.45k stars 744 forks source link

WASM Mobile - No keyboard #830

Open mikehawkes opened 5 years ago

mikehawkes commented 5 years ago

Hi - I can get my code to compile for WASM but have an issue: how do I get the keyboard to appear on mobile devices for text fields?

Thanks in advance.

therecipe commented 5 years ago

Hey

Yeah, I thinks that's a known issue: https://bugreports.qt.io/browse/QTBUG-70828 a work around would be to use the virtual keyboard https://bugreports.qt.io/browse/QTBUG-74537 which is also blocked by this issue https://bugreports.qt.io/browse/QTBUG-74850, which in the end probably depends on this issue https://github.com/emscripten-core/emscripten/pull/7631 being solved first.

However, it seems like the virtual keyboard already somewhat works in some special cases. So I will try to get an example working.

What kind of application do you need this to work with, Widgets or QML?

mikehawkes commented 5 years ago

Ahh - Ok.

Thanks in advance for the example: I'm hardcore! Widgets all the way.

therecipe commented 5 years ago

Okay, I looked into this and it seems like there is a workaround available for the second issue and the needed changes for the third one are already available as well.

I created some virtual keyboard examples here, but haven't tested them on wasm yet.

I hope it's possible to get this working with widgets, but it may be that the virtualkeyboard only works with QML when build for wasm/js.

therecipe commented 5 years ago

Looked into this again and tested the virtualkeyboard examples with thread support enabled for wasm and also without thread support, but couldn't get the keyboard to pop up for some reason. I also tested the official c++ Qt example, but couldn't get it working either.

So I will probably have to wait until Qt 5.13 is released, and then test it again.

mikehawkes commented 5 years ago

Ok. Thanks for trying - and the update.

Cheers Mike

On 8 May 2019, at 20:36, therecipe notifications@github.com wrote:

Looked into this again and tested the virtualkeyboard examples with thread support enabled for wasm and also without thread support, but couldn't get the keyboard to pop up for some reason. I also tested the official c++ Qt example, but couldn't get it working either.

So I will probably have to wait until Qt 5.13 is released, and then test it again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

eliezedeck commented 4 years ago

Any update on this?

PierreChicoine commented 4 years ago

Tried the qt webassembly widgets wiggly which has a editable text box. (msorvig webasembly examples). Still no working keyboard on Android. It would be simple for Qt to put up their virtual keyboard but it must not be very high in priority.