[Android-development] Height of Software Keyboard on Android Devices

Robert Iakobashvili coroberti at gmail.com
Thu Jan 2 20:07:04 CET 2014


Gentlemen,
The workaround found is:

1. to read the height of the main-window if it full-screen
    when keyboard is off ( It could be enforced if required by
    QInputMethod* inputMethod = QGuiApplication::inputMethod();
inputMethod->hide();)

2. to read the height of the main-window when the keyboard is on:
    i.e. in handling of inputMethodEvent(QInputMethodEvent * e);


3. Subtract the result of 1 and 2.


Hope it will be helpful.

Take care. Best.
Robert

On Thu, Jan 2, 2014 at 9:48 AM, Eskil Abrahamsen Blomfeldt
<eskil.abrahamsen-blomfeldt at digia.com> wrote:
> On 12/30/2013 03:56 PM, Robert Iakobashvili wrote:
>> Hello,
>>
>> Trying with QTextEdit example
>>
>> const QRectF keyboardRect = QGuiApplication::inputMethod()->keyboardRectangle();
>>
>> it returns zeroed QRectF whereas software keyboard is up.
>>
>> How to retrieve the height occupied by software keyboard?
>
> As far as I've been able to tell from reading forum posts about this,
> there's no way of getting the height of the bounding box of the software
> keyboard on Android. If anyone has information that contradicts this,
> please let me know.
>
> -- Eskil
>
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development



-- 
Regards,
Robert Iakobashvili, Ph.D.

Home:       http://www.ghotit.com
..............................................
           Ghotit Dyslexia
Das Ist Real Writer & Reader
...............................................



More information about the Android-development mailing list