[Interest] Loader seems to be blocking animation

VStevenP vstevenpavao at yahoo.com
Tue Dec 10 21:24:45 CET 2013

I switched over to using the new YAnimator type for my icon highlighter rectangle.  The animation works, but it's still blocked by the QML Loader, on both Android and Mac Desktop.

I got rid of all the old-style states and transitions syntax, and simply switched over to the following syntax:


    property int currentTab: 0

    Rectangle {
        id: pageTabs
        anchors.fill: parent
        color: "darkgrey"

        Rectangle {
            id: highlighterRect
            width: pageTabsPane.width

            height: pageTabsPane.width  // a square
            color: "black"

            YAnimator {
                id: highlighterRectAnimator
                target: highlighterRect
                duration: 40

            Component.onCompleted {
                y = homeIcon.y

        PageTabIcon {
            id: homeIcon

            onPageTabIconClicked: {
                highlighterRectAnimator.from = highlighterRect.y
                highlighterRectAnimator.to = homeIcon.y
                highlighterRectAnimator.running = true
                currentTab = Common.PageView.Home

        PageTabIcon {
            id: mixIcon
            y: pageTabsPane.width
            source: "img/mixIcon.svg"

            onPageTabIconClicked: {
                highlighterRectAnimator.from = highlighterRect.y
                highlighterRectAnimator.to = mixIcon.y
                highlighterRectAnimator.running = true

Is this the wrong syntax?  It's the one syntax I figured out that seemed to cause the Yanimation to work for animating the highlighted background from icon to icon.

- VStevenP

----- Original Message -----
From: Sletta Gunnar <Gunnar.Sletta at digia.com>
To: VStevenP <vstevenpavao at yahoo.com>; "interest at qt-project.org" <interest at qt-project.org>
Sent: Tuesday, December 10, 2013 8:43 AM
Subject: SV: [Interest] Loader seems to be blocking animation

You want to have a look at the new Animator types introduced in Qt 5.2. These run on the render thread and won't be blocked when the loader is running.



More information about the Interest mailing list