这个时候不能直接使用Image,得用AnimatedImage实现动图效果
Rectangle {
width: animation.width
height: animation.height + 8
AnimatedImage
{
id: animation
source: “123.gif”
}
Rectangle
{
property int frames: animation.frameCount
width: 4
height: 8
x: (animation.width - width) * animation.currentFrame / frames
y: animation.height
color: “red”
}
}

QML之动态图片

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-11-22
  • 2021-08-13
  • 2021-07-16
  • 2021-06-22
猜你喜欢
  • 2021-07-16
  • 2021-06-04
  • 2022-12-23
  • 2021-12-02
  • 2021-05-11
  • 2022-12-23
  • 2021-07-02
相关资源
相似解决方案