qmlweb icon indicating copy to clipboard operation
qmlweb copied to clipboard

Flicker issue

Open jhihn opened this issue 9 years ago • 5 comments

There is a flash of the green rect at the reset of the animation that does not happen in QtQuick 2.

Minor, but I'm leaving this report here.

import QtQuick 2.0

Rectangle {
  id: root
  width: 500; height: 200
  color: "blue"

  Rectangle {
    id: greenRect
    color: "green"
    width: 50
    height: 50

    Behavior on x {
      NumberAnimation {
        duration : 1000        
      }
    }
  }
  Timer {
    interval: 1000
    running: true
    repeat: true
    onTriggered: { 
      greenRect.x = (greenRect.x == root.width - greenRect.width) ? 
        0 : root.width - greenRect.width ;
      console.log("triggered", greenRect.x);
    }
  }
}

jhihn avatar Aug 17 '16 17:08 jhihn

Yes, I am able to reproduce this, thanks!

ChALkeR avatar Aug 18 '16 07:08 ChALkeR

The difference here is that e.g. x = 100 actually sets x to 100 first, then begins animating it from its previous value to 100.

ChALkeR avatar Aug 25 '16 07:08 ChALkeR

I don't follow. Ib don't see the same in regular qtquick

jhihn avatar Aug 25 '16 11:08 jhihn

@jhihn Yes, that is a bug, I just described the cause of the flicker.

ChALkeR avatar Aug 25 '16 11:08 ChALkeR

Gotcha.

jhihn avatar Aug 25 '16 11:08 jhihn