[Interest] Loading files from qrc, path or URL ?

Frank Mertens frank at cyblogic.de
Sun May 2 03:57:38 CEST 2021

Hi Nicholas,

that is right. Sometimes you need a resource path and sometimes an URI.
You can for instance open a file from your bundled resources with QFile, which requires a path as QString. But a QQuickView::setSource() expects a QUrl.

Best regards,

On 02.05.21 03:04, Nicholas Yue wrote:
> Hi,
>   Learning about QtCreator, I see that one may obtain a Path or URL to a resource.
>   When loading files (via e.g. c++) a resource what is the difference ? i.e. which should one use as a best practice ?
> image.png
> Cheers
> -- 
> Nicholas Yue
> Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
> Custom Dev - C++ porting, OSX, Linux, Windows
> http://au.linkedin.com/in/nicholasyue <http://au.linkedin.com/in/nicholasyue>
> https://vimeo.com/channels/naiadtools <https://vimeo.com/channels/naiadtools>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210502/a31e4545/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 87093 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210502/a31e4545/attachment-0001.png>

More information about the Interest mailing list