[Interest] QML TextEdit and onTextChanged on Android
harri at mpaja.com
Mon Dec 1 10:04:03 CET 2014
Hmm... something more elusive is going on.
In a simple test app I made it works as expected and
inputMethodHints: Qt.ImhNoPredictiveText is respected on Android.
On iOS onTextChanged is fired at each key regardeless of
being present or not. Predictions are always available though.
But in my real application it does not work, so I need to investigate more.
On 01/12/2014 06:22, Nevala Samuel wrote:
> Seems that you have predictive text on. Pre-edit text won't be included to text until committed (space / enter key). So you will get change signal every commit instead of key stoke. DisplayText property includes pre-edit text part and you will get change signal for every key stroke.
> For intercepting key stokes when predictive text is on I would code c++ event filter that catches QInputMethodEvents.
> Senior Consultant | The Qt Company
> The Qt Company Oy, Hatanpään valtatie 30, 33100 Tampere, Finland
> Email: samuel.nevala at theqtcompany.com | Mobile: +358 40 86 85 458
> Qt Blog: http://blog.qt.digia.com/ | Twitter: @QtbyDigia, @Qtproject Facebook: www.facebook.com/qt
> From: interest-bounces+samuel.nevala=theqtcompany.com at qt-project.org <interest-bounces+samuel.nevala=theqtcompany.com at qt-project.org> on behalf of Harri Pasanen <harri at mpaja.com>
> Sent: Friday, November 28, 2014 8:09 PM
> To: interest at qt-project.org
> Subject: [Interest] QML TextEdit and onTextChanged on Android
> I don't seem to get onTextChanged signal after each keystroke like on
> desktop, only after hitting Done on the virtual keyboard.
> Is it not possible to intercept each individual key on Android, or is
> this a bug?
> Interest mailing list
> Interest at qt-project.org
More information about the Interest