<div dir="ltr"><div><div><div>Hi.  I have designed a Virtual Keyboard using QML and am trying to use it in conjunction with a Qt (not QML) Webview.  <br><br></div>I've been following the clues given in this posting <a href="http://qt-project.org/forums/viewthread/11237">http://qt-project.org/forums/viewthread/11237</a> . Namely:<br>
<br>(1) Create a custom object and then <a href="http://doc.qt.nokia.com/latest/qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a><br>(2) <a href="http://doc.qt.nokia.com/latest/qwebframe.html#evaluateJavaScript">evaluateJavaScript</a>  to manifest the custom object when the input is clicked<br>
<br>But I'm confused about how to direct the typed characters from the Virtual Keyboard to the TextInput/Javascript/DOM.  I can emit a signal, but how would that be used to fill out a form?  How could I keep the relationship between the Keyboard and the TextInput active for long enough to enter a string of characters?<br>
<br><br></div>The link above suggests:<br><ol><li class=""><div class=""><a href="http://qt-project.org/doc/QString.html"><span class="">QString</span></a> WebBridge<span class="">::</span><span class="">openInputContext</span><span class="">(</span><span class="">const</span> <a href="http://qt-project.org/doc/QString.html"><span class="">QString</span></a> <span class="">&</span>orgtext<span class="">)</span></div>
</li><li class=""><div class=""><span class="">{</span></div></li><li class=""><div class="">    <a href="http://qt-project.org/doc/QString.html"><span class="">QString</span></a> text <span class="">=</span> <a href="http://qt-project.org/doc/QInputDialog.html"><span class="">QInputDialog</span></a><span class="">::</span><span class="">getText</span><span class="">(</span><span class="">NULL</span><span class="">,</span> <span class="">"Input Box"</span><span class="">,</span> <span class="">"Enter your text"</span><span class="">)</span><span class="">;</span></div>
</li><li class=""><div class="">    <span class="">return</span> <span class="">(</span><span class="">!</span>text.<span class="">isNull</span><span class="">(</span><span class="">)</span><span class="">)</span> ? text <span class="">:</span> orgtext<span class="">;</span></div>
</li><li class=""><div class=""><span class="">}</span></div></li></ol>This is very nice and I have been trying to adapt it by wrapping my QML Keyboard in a WebBridge that  inherits either from QDialog or from  QInputContext.  <br>
<br></div>No luck yet. Any ideas?<br><br>Thanks<br>Mitchell<br><div><div><br></div></div></div>