<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    You could try :<br>
    pyrcc4.exe -o resources_rc.py resources.qrc<br>
    <pre class="moz-signature" cols="72">-- 
Christophe</pre>
    <div class="moz-cite-prefix">Le 06/05/2016 à 10:04, matteo a écrit :<br>
    </div>
    <blockquote cite="mid:572C5005.4040708@gmail.com" type="cite">Hi
      guys,
      <br>
      <br>
      I'm facing a very annoying problem. In some UI of a plugin I need
      to add some icons in a QPushButton.
      <br>
      <br>
      Qt Designer allows to add icons in 2 ways (I think):
      <br>
      <br>
      1. by choosing the file in the computer (so a simple image)
      <br>
      2. by adding images of a resource file
      <br>
      <br>
      The 1. method doesn't give any trouble with QGIS but the icon is
      not visible once the plugin is loaded.
      <br>
      <br>
      With the 2. method I have some problem in QGIS. Once saved the UI,
      Qt adds the following lines to the code (interface.ui file):
      <br>
      <br>
      <br>
      <resources>
      <br>
        <include location="resources.qrc"/>
      <br>
      </resources>
      <br>
      <br>
      <br>
      and I've compiled the resource file with:
      <br>
      <br>
      <br>
      pyrcc4 -o resources.py resources.qrc
      <br>
      <br>
      <br>
      without any errors.
      <br>
      but this causes a crash of the plugin once loaded:
      <br>
      <br>
      <br>
      ImportError: No module named resources_rc
      <br>
      <br>
      <br>
      am I missing something?
      <br>
      <br>
      Thanks to all
      <br>
      <br>
      Cheers
      <br>
      <br>
      Matteo
      <br>
      _______________________________________________
      <br>
      Qgis-developer mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
      <br>
      List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
      <br>
      Unsubscribe:
      <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
    </blockquote>
    <br>
  </body>
</html>