<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How can i control android device keyboard?]]></title><description><![CDATA[<p dir="auto">How can i control android device keyboard in Qml? Like prevent to closing?</p>
]]></description><link>https://forum.qt.io/topic/89296/how-can-i-control-android-device-keyboard</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 21:55:17 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/89296.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Mar 2018 20:18:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can i control android device keyboard? on Sun, 01 Apr 2018 22:06:52 GMT]]></title><description><![CDATA[<p dir="auto">When i put <code>Qt.inputMethod.show()</code>  in onAccepted method of textfield, it flicker :D. This didn't work.</p>
<p dir="auto">I got same error with "forceActiveFocus". I don't found a correct way to update event on virtual keyboard.<br />
Some testing component in source.<br />
<a href="https://code.woboq.org/qt5/qtdeclarative/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp.html#_ZN19tst_qquicktextinput15signal_acceptedEv" target="_blank" rel="noopener noreferrer nofollow ugc">https://code.woboq.org/qt5/qtdeclarative/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp.html#_ZN19tst_qquicktextinput15signal_acceptedEv</a></p>
<p dir="auto">I changed the textfield to textarea and a new manual enter button solved the problem temporarily.<br />
At this time, text area goes over botttom of screen while i'm typing newline. This crashed too. :D</p>
]]></description><link>https://forum.qt.io/post/450715</link><guid isPermaLink="true">https://forum.qt.io/post/450715</guid><dc:creator><![CDATA[Hakan AFAT]]></dc:creator><pubDate>Sun, 01 Apr 2018 22:06:52 GMT</pubDate></item><item><title><![CDATA[Reply to How can i control android device keyboard? on Sun, 01 Apr 2018 12:02:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hakan-afat">@<bdi>Hakan-AFAT</bdi></a> if the keyboard closes even if you're switching focus back to the textfield or try to show()<br />
then as a workaround start a Timer to show() or forceActiveFocus()<br />
play with the delay - with some luck you'll find a value where Keyboard stays visible without flicker</p>
]]></description><link>https://forum.qt.io/post/450652</link><guid isPermaLink="true">https://forum.qt.io/post/450652</guid><dc:creator><![CDATA[ekkescorner]]></dc:creator><pubDate>Sun, 01 Apr 2018 12:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to How can i control android device keyboard? on Sat, 31 Mar 2018 21:14:29 GMT]]></title><description><![CDATA[<p dir="auto">I was working on onPressed method QtQuick.Controls2. I got this error,  ".onPressed" is not available due to component versioning." on android debug console.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a> yes, it should stay visible.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekkescorner">@<bdi>ekkescorner</bdi></a> i tried this one, too. But TextField signal onAccepted automatically hides the keyboard. Nothing happened with Keys.onReturnPressed. I need modify the onAccepted method on TextField. I found this in qt source, <a href="https://code.woboq.org/qt5/qtbase/src/gui/kernel/qinputmethod.cpp.html#214" target="_blank" rel="noopener noreferrer nofollow ugc">https://code.woboq.org/qt5/qtbase/src/gui/kernel/qinputmethod.cpp.html#214</a></p>
<pre><code>/*
    Requests virtual keyboard to close.
    Normally applications should not need to call this function,
    keyboard should automatically close when the text editor loses
    focus,((And if someone press enter)) for example when the parent view is closed.
*/
void QInputMethod::hide()
{
    Q_D(QInputMethod);
    QPlatformInputContext *ic = d-&gt;platformInputContext();
    if (ic)
        ic-&gt;hideInputPanel();
}
</code></pre>
]]></description><link>https://forum.qt.io/post/450605</link><guid isPermaLink="true">https://forum.qt.io/post/450605</guid><dc:creator><![CDATA[Hakan AFAT]]></dc:creator><pubDate>Sat, 31 Mar 2018 21:14:29 GMT</pubDate></item><item><title><![CDATA[Reply to How can i control android device keyboard? on Fri, 30 Mar 2018 09:56:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hakan-afat">@<bdi>Hakan-AFAT</bdi></a> have you tried Keys.onReturnPressed to detect the Enter key and then:<br />
<a href="https://doc.qt.io/qt-5/qinputmethod.html#show" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qinputmethod.html#show</a></p>
]]></description><link>https://forum.qt.io/post/450429</link><guid isPermaLink="true">https://forum.qt.io/post/450429</guid><dc:creator><![CDATA[ekkescorner]]></dc:creator><pubDate>Fri, 30 Mar 2018 09:56:36 GMT</pubDate></item><item><title><![CDATA[Reply to How can i control android device keyboard? on Fri, 30 Mar 2018 06:06:48 GMT]]></title><description><![CDATA[<p dir="auto">You mean keyboard should stay visible?</p>
<p dir="auto">Here's an idea: detect the enter key (you do it in <code>onAccepted</code> if I understand you well. An alternative is to use <code>Keys.onPressed</code>), and in the slot switch focus to some off-screen control. Or, for that matter, switch it back to your current input. The keyboard should  stay up this way.</p>
]]></description><link>https://forum.qt.io/post/450383</link><guid isPermaLink="true">https://forum.qt.io/post/450383</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Fri, 30 Mar 2018 06:06:48 GMT</pubDate></item><item><title><![CDATA[Reply to How can i control android device keyboard? on Thu, 29 Mar 2018 17:08:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a> On typing, it works great. Pops up the virtual keyboard and when my typing is done, i will be press the enter for onAccepted signal. But i need the change this action for disable closing the keyboard. How can i adapt this enter action on Qml?</p>
]]></description><link>https://forum.qt.io/post/450301</link><guid isPermaLink="true">https://forum.qt.io/post/450301</guid><dc:creator><![CDATA[Hakan AFAT]]></dc:creator><pubDate>Thu, 29 Mar 2018 17:08:32 GMT</pubDate></item><item><title><![CDATA[Reply to How can i control android device keyboard? on Wed, 28 Mar 2018 09:13:34 GMT]]></title><description><![CDATA[<p dir="auto">You can have (some) control of the keyboard by using <code>Qt.inputMethod</code> (documentation: <a href="https://doc.qt.io/qt-5/qinputmethod.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qinputmethod.html</a>) and tweaking focuses through <code>focus: true/false</code>, <code>forceActiveFocus()</code> in each item.</p>
]]></description><link>https://forum.qt.io/post/450006</link><guid isPermaLink="true">https://forum.qt.io/post/450006</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Wed, 28 Mar 2018 09:13:34 GMT</pubDate></item></channel></rss>