<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Thanks Eskil,</p>
<p>I have just a few QLineEdit in my application, but unfortunately also a lot of QSpinBoxes where the problem is the same. It's not reasonable to filter events for all and subclassing them all is quite a pain too.</p>
<p>I have opened QTBUG-40654 for that.</p>
<p>Btw I am wondering if I should open another two for these other problems, also related to virtual keyboard:</p>
<p>When using the virtual keyboard for a QSpinBox or a QDoubleSpinBox one would expect to get a numerical keyboard. That would indeed be much easier for the user. This is related to QTBUG-37619 for QtQuick so I don't know if I should open another one specificaly for QWidgets.</p>
<p>When modifying a QSpinBox or QDoubleSpinBox, it's possible to modify the suffix and prefix also, and the cursor is on the last character of the suffix which is not good too.</p>
<p>Thanks for your input</p>
<p>Philippe Lelong</p>
<p>Le 31-07-2014 08:45, Eskil Abrahamsen Blomfeldt a écrit :</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --> <!-- head ignored --><!-- meta ignored -->
<div class="moz-cite-prefix">On 07/24/2014 12:03 PM, <a class="moz-txt-link-abbreviated" href="mailto:maitai@virtual-winds.org">maitai@virtual-winds.org</a> wrote:</div>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px">
<p>Ok then, but this is weird to me. As a user I do not expect the virtual keyboard's OK button to close the dialog, but just to close the virtual keyboard so I can continue with other fields.</p>
<p>I have tried to setDefault(false) all the buttons in the dialog but it still calls done(), so it seems I cannot modify this behavior.</p>
<p>Note that pressing the physical "ok" button on the device just close the virtual keyboard and not the dialog.</p>
<p>Well... It seems I have to get used to it ;)</p>
</blockquote>
<br /> This is indeed a bit strange. What's happening here is that the virtual keyboard's OK button is generating a key event for the Enter key which is sent to the QLineEdit, but since QLineEdit ignores this key, it is sent to the QDialog instead. QDialog handles key events and will accept its button box when it sees an Enter key. In the case of a virtual keyboard, which works on a particular line edit, this is unexpected, so I wouldn't mind it if you reported this as a bug, since it should really be part of the platform theme (on Windows, enter should accept the dialog, whereas on Android this does not make sense). <br /> <br /> As a work-around, you can add an event filter to the QLineEdit and filter out the Enter key presses by returning true whenever you see them.<br /> <br /> -- Eskil<br /> <br /><!-- html ignored --><br />
<pre>_______________________________________________
Android-development mailing list
<a href="mailto:Android-development@qt-project.org">Android-development@qt-project.org</a>
<a href="http://lists.qt-project.org/mailman/listinfo/android-development" rel="noreferrer">http://lists.qt-project.org/mailman/listinfo/android-development</a>
</pre>
</blockquote>
<p> </p>
<div> </div>
</body></html>