[Qt-qml] Showing animated progress while loading large QML files

Yuvraaj Kelkar yuvraaj at gmail.com
Wed Jan 12 18:18:43 CET 2011


Just a thought, don't know if it will work for you:
Is it possible for you to begin loading the sub-qml in an Item with
opacity:0 while you show a Rectangle (opacity:1) with Text?
Then once you get the signal that the sub-QML is loaded,
PropertyChanges can switch opacities.

On Wed, Jan 12, 2011 at 3:08 AM, Pelle Johnsen <pelle.johnsen at gmail.com> wrote:
> Hi,
> I'm working on a QML based app. where I dynamically load 'sub' applications
> or plugins at runtime. However when running on maemo, loading of all the QML
> files of such a sub-app. takes quite a long time (5-10 secs, enough for the
> end user to be annoyed), so I'm wondering if there is a way to at least show
> an animated loading screen while this is going on. I've tried a couple of
> things, but haven't really found a satisfying solution:
>  - Wrap the QML in a Loader: This allows me to show a static loading screen,
> but as soon as I ask the loader to load the rest of the QML content, all
> animation is blocked while it's loading.
>  - Load the QML in a background thread: This fails because the QML contains
> a lot of images which in turn creates QPixmaps, which doesn't work from
> another thread than the main ui thread :(
> I've done a number of things to speed up the actual loading itself, but I
> don't think I can get it much faster:
>  - Prefetch the QML, i.e. have the QML engine load the same QML file so it
> caches the parsed version of the QML
>  - Prefetch images, i.e. have the image loaded into QPixmapCache ahead of
> time
> Any help appreciated,
>  -Pelle
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
>


More information about the Qt-qml mailing list