> Sent: Wednesday, January 22, 2020 at 1:56 PM
> From: "Thiago Macieira" <thiago.macie...@intel.com>
> To: interest@qt-project.org
> Subject: Re: [Interest] Should onImageSaved give a URL?
>
> On Wednesday, 22 January 2020 10:09:20 PST Jason H wrote:
> > When assigning an image element to an image capted from a Camera, it is not
> > sufficient to just assign the `path` to the source of the Image element
> > that is to display it: qrc:/main.qml:100:4: QML Image: Cannot open:
> > qrc:/var/mobile/Containers/Data/Application/8BD0A3CA-74AA-4599-BCF5-E1863AE
> > A688F/Documents/img_0010.jpg
> >
> > As can be seen, it prepends "qrc:" on to it. The fix is to prefix it with
> > "file://";
>
> All paths and URLs are relative to the current working dir (or equivalent). In
> the case of a QML file loaded from a resource, it's somewhere in qrc:/. So no
> bug in Qt.
>
> >
> > onImageSaved: {
> >     var url = "file://"+path;
>
> NEVER construct a URL like this.

Then how should it be done?
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to