<div dir="ltr"><div>Hi,</div><div><br></div><div>Quite a few developers, like me as well, are not using resource files anymore. It's more simple, no need to compile resource files etc. It's just my opinion.</div><div><br></div><div>You can just use pathlib, for instance : </div><div><ul><li>Define a variable at the root of your plugin : </li></ul></div><div>DIR_PLUGIN_ROOT = Path(__file__).parent</div><div><br></div><div>Then call it when you want with an icon : </div><div>QIcon(str(DIR_PLUGIN_ROOT / "resources/icons/logo.svg"))</div><div><br></div><div>Regards,</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le jeu. 8 janv. 2026 à 11:43, Benjamin Jakimow via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Experts,<br>
<br>
for our QGIS Python plugins we load icons into the Qt Resource system, <br>
so that they can be accessed as in QIcon(r':/myplugin/myicon.svg').<br>
<br>
In PyQt5 / QGIS3 we do this by:<br>
1. compiling myresource.qrc files into a myresource_rc.py file, either <br>
using pyrcc5 (on CLI) or qgis.PyQt.pyrcc_main (in Python).<br>
2. loading these icons on plugin start-up, like in:<br>
<br>
   import myresource_rc<br>
   myresource_rc.qInitResources()<br>
<br>
It seems that in QGIS4 / Qt6 neither pyrcc5 nor qgis.PyQt.pyrcc_main is <br>
available (tested in OSGeo4W qgis-qt6 environment).<br>
<br>
It's possible to create *_rc.py files using pyside6-rcc, but they use<br>
from PySide6 import QtCore<br>
which is not available (e.g. in the current OSGeo4W qgis-qt6 environment).<br>
<br>
Does anyone have an idea how we can create Qt6-style *._rc.py files <br>
instead?<br>
<br>
Greetings, Benjamin<br>
<br>
<br>
<br>
On 08.01.26 09:41, Valentin Buira via QGIS-Developer wrote:<br>
> Hi devs, and happy new year to you all!<br>
> <br>
> I just posted a new QEP about introducing a data viewer in the model <br>
> designer canvas from the. Please see: <a href="https://github.com/qgis/QGIS-" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS-</a> <br>
> Enhancement-Proposals/pull/359 <<a href="https://github.com/qgis/QGIS-" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS-</a> <br>
> Enhancement-Proposals/pull/359><br>
> <br>
> This QEP aims to bring an integrated data viewer directly inside the <br>
> model designer to inspect and debug the state of your model as you build <br>
> them.<br>
> <br>
> Thanks for any feedback and cheers,<br>
> Valentin<br>
> <br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
-- <br>
Dr. Benjamin Jakimow<br>
Earth Observation Lab | Geography Department | Humboldt-Universität zu <br>
Berlin<br>
<br>
e-mail: <a href="mailto:benjamin.jakimow@geo.hu-berlin.de" target="_blank">benjamin.jakimow@geo.hu-berlin.de</a><br>
<br>
phone:  +49 (0) 30 2093 45846<br>
mobile: +49 (0) 157 5656 8477<br>
<br>
mail:   Unter den Linden 6 | 10099 Berlin | Germany<br>
matrix: @jakimowb:<a href="http://hu-berlin.de" rel="noreferrer" target="_blank">hu-berlin.de</a><br>
web:    <a href="https://eolab.geographie.hu-berlin.de/" rel="noreferrer" target="_blank">https://eolab.geographie.hu-berlin.de/</a><br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>