[PyQt] Fwd: qrc:/// not working to access resources?

michael h michaelkenth at gmail.com
Wed Feb 5 04:25:11 GMT 2014

On Tue, Feb 4, 2014 at 9:43 AM, Shriramana Sharma <samjnaa at gmail.com> wrote:

> On Tue, Feb 4, 2014 at 8:27 PM, Hans-Peter Jansen <hpj at urpla.net> wrote:
>> Checking, if it starts with a colon is doing fine, isn't it?
> That's right. If I use qrc:// it is NOT working. That's what the output of
> the script initially posted is intended to show.
> --
> Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

>From the docs:

    By default, resources are accessible in the application under the same
file name as they have in the source tree, with a :/ prefix, or by a URL
with a qrc scheme.

   For example, the file path :/images/cut.png or the URL
qrc:///images/cut.png would give access to the cut.png <snip>

As I understand it, QImage doesn't take a URL, it takes a file path, so you
need to use the ':/thing' form. This does not access the "outside" (?) file
system. I would tend to agree with Pete-- that a path starting with a colon
is enough of a hint that an embedded resource is used.

- Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140204/f2b5d519/attachment.html>

More information about the PyQt mailing list