我遇到BusyIndicator的问题,发生的事情是我已经指定BusyIndicator在加载Feed时删除了,但在我的文件中。 QML图像没有出现在Feed中,我想知道是否有任何方法可以告诉BusyIndicator当图像显示BusyIndicator时删除。
答案 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后,忙碌指示将消失。