如何在阅读Feed后删除BusyIndi​​cator

时间:2012-02-20 17:04:44

标签: qt symbian qml

我遇到BusyIndi​​cator的问题,发生的事情是我已经指定BusyIndi​​cator在加载Feed时删除了,但在我的文件中。 QML图像没有出现在Feed中,我想知道是否有任何方法可以告诉BusyIndi​​cator当图像显示BusyIndi​​cator时删除。

2 个答案:

答案 0 :(得分:1)

你可以做这样的事情

Image{
   id:remoteImage
   source: "http://www.example.com/m.jpg"

   onProgressChanged: {
   if(progress==1.0)
        busyIndicator.visible=false;

  }
}

答案 1 :(得分:1)

我做到了这一点,你可以尝试一下。

Image
{
id : image1
source:"...your source here"
}

BusyIndicator 
{
id:busy1
anchors.centerIn: parent
width:50
height:50
visible: image1.status == Image.Loading 
running: image1.status == Image.Loading 
}

//指示器仅可见并在加载图像时运行。加载图像或Image.Ready后,忙碌指示将消失。