[Development] Qt mobile input context scrolling
vseryakov at gmail.com
Thu Mar 9 06:33:11 CET 2017
I am trying to disable Qt auto-scrolling on mobile devices(iOS, Android) when focusing on an input field in QtQuick.
For iOS it was pretty simple and just for a proof of concept making QIOSInputContext::scrollableRootView to always to return 0 disabled the auto-scrolling so we can in our app deal with keyboard showing or hiding. We have our own complex UI and auto-scrolling makes it a bad user experience.
Dealing with it turned out to be more work and never ending race condition.
So, it works very good now on iOS, my next step will be android and this is not that straightforward. Not familiar with Android internals, and after reading Android platform plugin and base java/jar sources i am still puzzled when the scrolling happens.
Does anybody can point me where to look? This will save time but i am going to dig into it anyway, so this is not a request.
The actual question is, if disabling will show it is possible, what would be the solution to make it available to developers? For complex apps, the auto-scroll does not make sense.
I looked into QPlatformIntegration classes, the only generic method is to set QPlatformWindow flags. At the same time with this little switch i do not want to break binary compatibility or change a lot of base classes. Having it available in the C++ at least makes it flexible to use the auto-scroll or not.
More information about the Development