[Interest] Loader seems to be blocking animation

VStevenP vstevenpavao at yahoo.com
Tue Dec 10 14:20:42 CET 2013


Is it possible to avoid the Loader blocking an animation in the following case?:

1. I have a sidebar that contains a few icons, and I am animating the location of a colored Rectangle to highlight the most recently touched sidebar icon.

2. As a result of a new sidebar icon selection, I am unloading/loading some other QML based on the resulting change to the value of currentTab.

So, I've basically got a very simple situation where the sidebar icon selection controls the QML that is loaded/shown in a shared client area of the display.

Sample code:

        DesktopIcon {
            id: thisIcon
            y: 200
            source: "thisIcon.png"

            onDesktopIconClicked: {
                pageTabs.state = 'arrange'            // This triggers the animation of the highlighter rectangle of the icon.
                currentTab = Common.PageView.Arrange  //  This causes unload old QML then load new QML for client pane area,
                                                      //  due to a binding to currentTab elsewhere in the code.
            }
        }

This code causes a noticeable delay before the animation occurs, at least on Android.  It seems the Loader blocks the animation.  Is this delay at all avoidable?  My current workaround is to not use the Loader, and just load all the QML at startup, then use the visibility property to control what is shown in the client pane area.  It requires that more QML stay loaded at a given time, though.  (This workaround might not be all bad, because it would allow for nicer transition animation possibilities in the client pane area.)

- VStevenP



More information about the Interest mailing list