在QML中为Ubuntu Touch使用图片作为图像对象

我正在尝试使用主图片目录(/ home / phablet / Pictures)中的图像文件作为AnimatedIMage / Image对象,但它说错误读取文件。 我已经尝试了两条路径,但都没有工作。 我知道我可以简单地在我的应用程序中包含图像,但我想在旅途中使用不同的图像。 谢谢。

AnimatedImage{ id: gifVegeta anchors.fill: parent source: '/home/phablet/Pictures/vegeta_charge.gif' //source: 'file:///home/phablet/Pictures/vegeta_charge.gif' } 

我担心你不能:你的应用程序被限制,并且无法访问~/Pictures目录下的任何文件。 有关该主题的更多信息, 请访问https://developer.ubuntu.com/en/apps/platform/guides/app-confinement/