Context: I'm creating a small web browser with a custom on-screen keyboard.
It was working almost fine with Qt WebKit (QWeb*
classes) but there were crashes attributed to bugs in WebKit... which won't be fixed after Qt 5.4.0 since they're moving to Qt WebEngine.
So I decided to move the stuff to Qt WebEngine (QWebEngine*
classes), following the short webkit->webengine transition guide.
Following the caveat section on QWebElement
, I have worked my way around showing/hiding the on-screen keyboard (which now requires running async. JS code).
But I'm scratching my head on how to send artificial key events to the web page.
I have tried the some stuff:
QCoreApplication::postEvent(m_webview, event)
doesn't do anything, when it was working with the oldQWeb
stuff;- It's possible to send keys by running JavaScript but I find this too dirty
Thanks,
See Question&Answers more detail:os