[Interest] [qt-android][qt-iOS] Is it possible to disable page scrolling when software keyboard is being shown?

Liang Jian jianliang79 at gmail.com
Thu Apr 28 15:08:42 CEST 2016


    Thank you for the answer, I think this should work :-)

On Wed, Apr 27, 2016 at 8:02 PM, Mike Krus <mike.krus at kdab.com> wrote:

> Hi
>
> the trick I used in the past is to:
> - put a MouseArea as a child of the TextField to stop the focus becoming
> active
> - onClicked, move the TextField to some location, outside where the kb
> will be
>   positioned, can use Qt.inputMethod.keyboardRectangle to figure out the
> size of that
>   (not sure it’s always correct though)
> - when your animation finishes, set the focus explicitly in the text
> field, causing
>   the keyboard to appear
>
> If you decompose your animation in two, you can set the focus earlier, as
> long
> as your text field never ends up under the keyboard
>
> Then detect keyboard dismissal (Qt.inputMethod.visible) to move the text
> field back into place.
>
> A lot of work…
>
>
> Mike
>
>
> > On 21 Apr 2016, at 09:30, Liang Jian <jianliang79 at gmail.com> wrote:
> >
> > Hello everyone,
> >     One of the page in our qml app have an input box(such as a TextEdit
> element)
> > at the bottom, when user press the input box the software keyboard will
> show,
> > and we want the background of the page keep still while the input box
> scroll
> > to the top of software keyboard.
> >      The current Qt implementation will always scroll the whole page
> which make
> > it impossible to implement this behaviour. We have to use native UI
> element to
> > implement this(in both android and iOS) which require too much code.
> > Is it possible to disable page scrolling while showing software keyboard?
> >     If that is possible then we can implement this behaviour easily.
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
> --
> Mike Krus | mike.krus at kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company
> Tel: UK +44-1625-809908   Mobile: +44 7833 491941
> KDAB - The Qt Experts
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160428/a6a5c9b9/attachment.html>


More information about the Interest mailing list