<div dir="ltr"><div>Hello. I'm using PyQt 4.10.3 with Qt 4.8.4 on Kubuntu Saucy. <br><br>As per my local Qt4 doc it is valid to access rcc-ed (and imported) resources by just :/path/to/file or qrc:///path/to/file. As per the examples at <a href="http://qt-project.org/doc/qt-5/resources.html">http://qt-project.org/doc/qt-5/resources.html</a> it seems qrc:/path/to/file is valid as well. However, on my system only :/ is working and not the other two. Please see the following session with the attached code:<br>

<br>$ ls<br>res.png  res.qrc  test.py<br>$ cat res.qrc<br><!DOCTYPE RCC><RCC version="1.0"><br><qresource><br><file>res.png</file><br></qresource><br></RCC><br>$ pyrcc4 -py3 res.qrc -o res.py<br>

$ cat test.py<br>#! /usr/bin/env python3<br>from res import *<br>from PyQt4.QtGui import QImage<br>i = QImage("qrc:///res.png")<br>print(i.isNull())<br>i = QImage("qrc:/res.png")<br>print(i.isNull())<br>

i = QImage(":/res.png")<br>print(i.isNull())<br>$ python3 test.py<br>True<br>True<br>False<br>$<br><br clear="all"><div>Am I doing anything wrong? Please advise. Thank you.<br></div><div><br>-- <br>Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
</div></div></div>