[Development] Idea: add transition capabilities to QML TextInput

Alan Alpert 416365416c at gmail.com
Sat Dec 22 21:42:42 CET 2012

On Sat, Dec 22, 2012 at 8:52 AM, Mark <markg85 at gmail.com> wrote:
> Hi,
> The idea for this came from ListView. In a ListView you can define a
> "add: Transition" and "delete: Transition" (among others).
> With a TextInput the text itself is quite "static" as in there isn't
> much to animate there or play with. It's just adding text (typing) or
> removing text (backspace/delete) and that's it. The thing i'd like to
> do in QML is have some animations when text is added or deleted.
> The kind of animation i think of are:
> for deleting: the deleted text drops out of the TextInput with some
> animation or shader fun.
> for adding: the added text smoothly fades+slides in
> The animation part should obviously be left to the app creator. If the
> Qt devs could provide transition capabilities just like ListView has
> then it's perfect for me.
> So, would it be possible to implement this in QtQuick 2.1 (or whatever
> the next version is going to be)?

The next version would indeed be QtQuick 2.1. But it's better not to
think about specific versions when looking at new features, if the
feature is valid then it will be integrated as soon as it is ready. I
doubt this feature would be ready by QtQuick 2.1, but that depends on
the implementation complexity.

> Right now this can already be done though in a very crude manner. By
> making a own "TextInput" that uses a ListView, a ListModel and a bunch
> of small Text elements. But that will obviously bring in a range of
> difficulties that are already handles in ThextInput just fine.

Generally suggestions for specific API additions should go to
bugreports. I've filed this one for you,
https://bugreports.qt-project.org/browse/QTBUG-28810, and put my
response there.

The dev list is more for questions about how to implement features, or
to discuss the shape of APIs for fulfilling more generic use cases.
But I understand the line between the dev list and bugreports isn't
clearly defined, so I could be a little overzealous here.

Alan Alpert

More information about the Development mailing list